Page 1 of 1

source ip address of all traffic via openvpn tunnel

Posted: Sat Feb 19, 2011 2:13 pm
by creagel
Hi,

I have routed ptp tunnel (openvpn 2.1, tun interfaces). Everything works fine. But any traffic going via this tunnel have source ip address of one of the point of openvpn tunnel. It's possible to have unchanged source ip address of traffic via this tunnel?

Topology:

[LAN1]--------[VPN_BOX1]------------{internet}----------[VPN_BOX2]-----------[LAN2]

VPN_BOX1:
eth0: 192.168.1.1/24
tun0: 10.90.0.1

VPN_BOX2:
eth0: 192.168.2.1/24
tun0: 10.90.0.2


If I ping from PC in LAN1 any PC in LAN2, and on PC in LAN2 run tcpdump, then I get any packets have source ip addres 10.90.0.1.

Re: source ip address of all traffic via openvpn tunnel

Posted: Sun Feb 20, 2011 11:08 am
by maikcat
hi there,

what OS has vpn-box1?

if linux try posting here what iptables -L -t nat returns..


cheers,

michael.

Re: source ip address of all traffic via openvpn tunnel

Posted: Sun Feb 20, 2011 9:13 pm
by creagel
It's freebsd 7. I don't use any firewall or nat.

Re: source ip address of all traffic via openvpn tunnel

Posted: Mon Feb 21, 2011 7:30 am
by janjust
openvpn does not do NAT'ting by itself, unless the freebsd port is totally broken. Your VPN Boxen are doing NAT'ting somewhere, check the configurations.
Also, try running tcpdump on one of the VPN boxen to follow the flow of packets - which source IP do the packets have when they enter the VPN box?