[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] Issue of openvpn NATing traffic


  • Subject: Re: [Openvpn-users] Issue of openvpn NATing traffic
  • From: Jean-Pierre Schwickerath <lists@xxxxxxxxxxxx>
  • Date: Fri, 1 Oct 2004 15:41:39 +0200

Hi, 

> -A POSTROUTING -s  192.168.26.0/255.255.255.0 -j MASQUERADE
> -A OUTPUT -s 192.168.26.0/24 -o eth0 -j ACCEPT

You're masquerading the traffic coming from your private subnet. That's
the reason why you see the IP of the external interface. 
I would replace the first roule with
-A POSTROUTING -o eth0 -s  192.168.26.0/255.255.255.0 -j MASQUERADE
or
-A POSTROUTING -o ! tap+ -s  192.168.26.0/255.255.255.0 -j MASQUERADE
or (if using tun)
-A POSTROUTING -o ! tun+ -s  192.168.26.0/255.255.255.0 -j MASQUERADE


This will only masquerade the unencrypted traffic, not the one going
through the tunnel 



Jean-Pierre

-- 
Powered by Linux From Scratch - http://schwicky.net/
PGP Key ID: 0xEE6F49B4 - AIM/Jabber: Schwicky - ICQ: 4690141

Nothing is impossible... Everything is relative!

____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users