This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DNAT ESP

Hello,

I have a VPN-Freeswan server/client host behind ASL 2.0 with private IP (lets call A), and I want to connect it with other public hosts too with Freeswan ( lets call B). 

Rules let pass esp and udp 500 between A and external hosts

Internal A is masquerade and I can connect without problem from A to B but if I want connect from B to A I need DNAT udp 500 and esp protocol from 0.0.0.0 to internal server. With webmin admin I can DNAT udp 500 but I can not to add a DNAT rule with a service with a protocol other than tcp or udp.

So how can I add to NAT firewall rules something like this ? :

iptables -t nat -I AUTO_NAT_PRE -p esp -d  -j DNAT --to A

Must I hack ASL box, and if I must, what way do you suggest ?

Another question:
Why if I add a DNAT rule, I found a AUTO_NAT_PRE entry with the rule and too a AUTO_NAT_OUTwith same rule, isnt it innecessary ?.

Regards

M. Deza


This thread was automatically locked due to age.
Parents
  • Originally posted by mande:
    Hello,

    [...]
     With webmin admin I can DNAT udp 500 but I can not to add a DNAT rule with a service with a protocol other than tcp or udp.

    Regards

    M. Deza
    NAT is simply not defined for ESP.
    There is a solution ESPoverUDP (2797) or NAT-Traversal, but it's not implemented in ASL.

    Erik
  • Hello Jader,

    Thanks for your answer.

    Sorry but this DNAT rule:
    - "iptables -t nat -I AUTO_NAT_PRE -p esp -d  -j DNAT --to A" - can be  added manually to ASL box without problem and all works well. The only problem is when I change some rule via webmin, then iptables is restarted and I lose the rule. I have been reading topics about this and it isnt clear how to add permanently an extra rule to webmin defined astaro rules.

    Sorry for my poor English.

    Thanks again and regards.

    M.Deza
Reply
  • Hello Jader,

    Thanks for your answer.

    Sorry but this DNAT rule:
    - "iptables -t nat -I AUTO_NAT_PRE -p esp -d  -j DNAT --to A" - can be  added manually to ASL box without problem and all works well. The only problem is when I change some rule via webmin, then iptables is restarted and I lose the rule. I have been reading topics about this and it isnt clear how to add permanently an extra rule to webmin defined astaro rules.

    Sorry for my poor English.

    Thanks again and regards.

    M.Deza
Children
No Data