iptables and openvpn

Matthew Gillen me-5yx05kfkO/aqeI1yJSURBw at public.gmane.org
Wed Aug 12 12:50:36 EDT 2009


On 08/12/2009 12:21 PM, markw-FJ05HQ0HCKaWd6l5hS35sQ at public.gmane.org wrote:
> So, the routing works. The 192.168.x.x machines are going to the gateway
> correctly. The gateway is sending the ping over openvpn correctly. The
> openvpn connection is working correctly. The final step of getting the
> packet from the server mack to the machine is failing.
> 
> What am I missing?

The S(ource)NAT on any packets going out the tunneled interface.

Assuming tun0 is your vpn pipe on B that hooks up to A:
 iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE


Matt





More information about the Discuss mailing list