Guest User!

You are not Sophos Staff.

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

Problem routing WAN traffic across IPSEC

I'm trying to route traffic from WAN across an IPSEC tunnel to a server

WAN -> Sophos1 -> IPSEC -> Sophos 2 -> Server

I've configured firewall rule and NAT rule, then added 'system ipsec_route add net 172.16.1.0/255.255.255.0 tunnelname IPSEC

I also added the WAN IP address to both sides of the IPSEC tunnel so that the Sophos knows where that IP sits.

Packet capture all looks perfectly correct on Sophos1

Problem is, when I do a packet capture on Sophos2 there is no traffic whatsoever. It's as if the traffic doesn't disappears in to the never never.

I've google around and read multiple forums and it all seems to be setup correctly.

What am I missing?



This thread was automatically locked due to age.
Parents Reply Children
  • These Screenshots are senseless, lacking complete infos. How shall we check black squares?

    ok last try: Is there an entry for the server by its IP or do you have the whole net included in your DNAT?

    Mit freundlichem Gruß, best regards from Germany,

    Philipp Rusch

    New Vision GmbH, Germany
    Sophos Silver-Partner

    If a post solves your question please use the 'Verify Answer' button.

  • You likely will need a IPsec Route. 

    docs.sophos.com/.../index.html

    __________________________________________________________________________________________________________________

  • I’ve already got an ipsec route

    • I've configured firewall rule and NAT rule, then added 'system ipsec_route add net 172.16.1.0/255.255.255.0 tunnelname IPSEC

    Originating side is operating fine. But traffic doesn’t show up in packet capture on destination side

  • It looks completely fine then. Traffic is routed through IPsec. But no reply. 

    __________________________________________________________________________________________________________________

  • I’m not going to post my IPs on a public forum. Happy to send to you in a private message if you think it will help.

    Entire destination subnet is in the IPSec config. I can ping and access all servers in Site 2 from Site 1 without any problem. It’s only the DNAT from WAN which isn’t working.

  • Likely the problem is caused by the other peer. As you are NAT only the destination, the original WAN connection stays there. The server could send the reply directly to the peers WAN and not back to the XFRM. 

    You could resolve this by doing a SNAT as well. Keep in Mind, you need to use a SNAT object, which is within your local network. So create a Host object within one of your Local Networks in Ipsec and use this in the same NAT rule. This should work. 

    __________________________________________________________________________________________________________________

  • Wild guess: could be the precedence of rules as well.

    Could you move the DNAT up to be processed first?

    Mit freundlichem Gruß, best regards from Germany,

    Philipp Rusch

    New Vision GmbH, Germany
    Sophos Silver-Partner

    If a post solves your question please use the 'Verify Answer' button.

  • Likely not. You see, the NAT is hitting the packet capture. You have to read it from bottom to top. And it is natted and transfered to the XFRM. But nobody is replying. This could due multiple reasons: Firewall rule missing on Peer. Routing on Peer etc. 

    You will likely resolve all of those issues with a SNAT as well. 

    __________________________________________________________________________________________________________________

  • Yes I agree. SNAT was actually my first thought and is most logical, but if I put an SNAT in, it doesn't even route across the tunnel at all and just does straight out to the internet with no NAT or FW rules appled, which seems odd. I even tried a system SNAT. Screenshot below. If I remove the SNAT, packet capture shows it going across the tunnel, but never gets to the other end.

    I also tried putting the WAN IP address on both ends of the tunnel so that the Sophos knew to return traffic to the IPSec tunnel

    Before SNAT:

    After SNAT:

  • But if the firewall is missing on peer, or routing, it should at least appear in the packet capture. The packets would come in, the Sophos just wouldn't know what to do with them?

    On peer (Sophos 2) there's a VPN -> LAN allow all rule