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

Applying SNAT to traffic leaving an IPSec VPN

Hello guys, hopefully someone can help me with my problem.

Picture the following topology

{client}  [network A]  [network B]  {internet}
. . . . . . . . . . . . USG 50. . . . . . . . . . . . Sophos UTM. . . . . . . . . . . . 

I have a client on network A that needs to get to a particular website on the internet using one of the IPs on the Sophos UTM WAN side.
I have a working tunnel between the two. The UTM is the router for network B and I have a ZyXEL USG 50 acting as the gateway for network A.
I have set up the following rules:

Where CLIENT is 10.10.10.1 and SERVER is 8.8.8.8

Traffic makes its way over the VPN fine. But the SNAT rule isn't applying. The following tcpdump was run on the UTM box. eth1 is my WAN interface:


So the traffic is leaving the WAN interface without the source address being rewritten. I have also tried adding a masquerading rule but this hasnt worked either.

What have i missed?

Thanks


This thread was automatically locked due to age.
  • Hi, and welcome to the User BB!

    As you've discovered, you can't solve this with NAT (well, not easily or elegantly).  You want How to allow remote access users to reach another site via a Site-to-Site Tunnel.

    Cheers - Bob
  • Hi, and welcome to the User BB!

    As you've discovered, you can't solve this with NAT (well, not easily or elegantly).  You want How to allow remote access users to reach another site via a Site-to-Site Tunnel.

    Cheers - Bob


    Hi Bob, thanks for the quick reply [:)]. I'm not sure I fully understand the article you have linked. Would you mind just elaborating very slightly on what config is needed?
    There is only 1 VPN is use and that is the site-to-site between my firewalls.

    Thanks
  • {client}  [network A]  [network B]  {internet}

    Did you mean something more like the following?

    {Network A}<>[UTM]>{one IP out on the internet}


    That is, anyone in Network A that wants to reach a specific public IP will have that access pass through the IPsec tunnel so that the access will be sent by the UTM - correct?

    If that's the case, just add the public IP to the tunnel and add firewall and masq rules allowing traffic to the IP from {Network A}.

    Cheers - Bob

  • Did you mean something more like the following?

    {Network A}<>[UTM]>{one IP out on the internet}


    That is, anyone in Network A that wants to reach a specific public IP will have that access pass through the IPsec tunnel so that the access will be sent by the UTM - correct?

    If that's the case, just add the public IP to the tunnel and add firewall and masq rules allowing traffic to the IP from {Network A}.

    Cheers - Bob



    Yes that's right, and i think i have that config already.

    On the Network A end, traffic destined to the internet address (lets say 8.8.8.8) is sent over the tunnel.
    At Network B I have an IPsec policy with Strict routing off and auto-firewall on. I also have a firewall rule allowing all traffic from Network A to any destination. I can see the packets reaching the UTM device from the tunnel.

    I have a masq rule on the UTM translating any network A IP to the WAN interface address of the UTM.

    However it still doesnt seem to work, the traffic leaves the UTM with the source address 10.10.10.1 which is Network A's local range, so no response is possible.
  • For clarity, here are my ipsec and masq rules

  • If you want {one IP out on the internet} in the Tunnel, it must appear in 'Local Networks' and in the equivalent of 'Remote Networks' in the USG.  Apparently, there's still a NAT rule somewhere that's mucking things up.  You definitely should start by deleting the SNAT in your first post here, but I also suspect there's something still to be done in the USG.

    Cheers - Bob