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

SNAT from one IPSec Tunnel to another

Hello, guys!

We have one task that cannot complete for past few days. We have Astaro Virtual Appliance with a lot of IPSec tunnels. At this task we manage only with two of them.

Astaro Internal Network: 192.168.12.0/24

IPSec1:
Local net: 192.168.12.0/24
Remote net: 192.168.50.0/23

IPSec2:
Local net: 192.168.12.0/24
Remote net: 172.21.8.0/23

We need to NAT traffic from 192.168.50.0/23 to 172.21.8.0/23 with ip 192.168.12.1.

I have added to IPSec1 network 172.21.8.0/23 as Local net to permit passing of these packets

After it, I created SNAT rule:
Traffic Source: 192.168.50.0/23
Traffic Service: Any
Traffic Destionation: 172.21.8.0/23
Type: SNAT
Source: 192.168.12.1
select Rule applies to IPSec packets

But I cannot see any translation while pinging or telneting.

For tests, I cloned this SNAT rule and changed Traffic Source to another local network on Astaro: 192.168.160.0/24.
All works correct with this network - 192.168.160.0/24 is NATed to 192.168.12.1 and after it is being sent to 172.21.8.0/23. I see nat translations on astaro:

Proto NATed Address Destination Address State 
icmp 192.168.160.1 172.21.8.210

So, SNAT rule doesn't change its behavior despite "Rule applies to IPSec packets" is turned on or off.

Please help, it's very important for us.


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

    That looks liike it should work.  It shouldn't make any difference, but what happens if you add 192.168.50.0/23 to remote networks in IPsec 2?

    In any case, I think you should ask your reseller to open a support ticket with Astaro/Sophos containing your post above.

    Cheers - Bob
  • Bob, we have a lot of networks and it is a little bit strange to give all of them to our customers. Customers should see one network, and they should see no networks anymore. Otherwise, our developers, support teams and other stuff should see all customers network.
  • I agree, but that experiment might help us understand where the error is.

    Do you have 'Strict Routing' selected for either or both IPsec tunnels?

    Cheers - Bob
  • No, strict routing is disabled due to manuals:
    Strict Routing: If strict routing is enabled, VPN routing is done according to source and destination IP address (instead of only destination IP address). In this case, only those packets exactly matching the VPN tunnel definition are routed into the VPN tunnel. As a consequence, you cannot use SNAT to add networks or hosts to the VPN tunnel, that are originally not part of the tunnel definition. On the other hand, without strict routing, you cannot have a mixed unencrypted/encrypted setup to the same network from different source addresses.


    Shoud it be enabled?
  • Everything sounds correct.

    After Astaro/Sophos Support figures this out, please post the answer back here.

    Cheers - Bob