Ipsec - routing private subnet public

From Skytech
Jump to navigation Jump to search


While setting up ipsec - and findout that you can reach one network but not the other by seeing the working network (on both routes) routes via the ipsec tunnel from private <==> private net.

On the other network you see the router (usually multihomed) trying to route traffic to that network from the public interface <==> private net.

One has to tell the router to SNAT to the private net:

## Assuming:
### Destination network:
### Source network:
### Routing via private network router/gw:

$IPT -t nat -A POSTROUTING -d -s -j SNAT --to-source