IP Routing Problem

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
stevodevo
OpenVpn Newbie
Posts: 2
Joined: Thu Dec 02, 2010 3:44 am

IP Routing Problem

Post by stevodevo » Thu Dec 02, 2010 3:55 am

Hi Guys,

New OpenVPN user here! I've got a Linux OpenVPN server at my corporate network and a Windows OpenVPN client at another site that I'm trying to get to talk together!

The VPN is established and I can ping from the Windows client to the Linux Server, but I can't get from the Windows Client any further into my corporate network. The Windows Client has a real IP of 10.162.139.31 and a TUN IP of 172.16.0.6 and when I try to ping a device on my corporate network (192.168.46.0/24) I don't get a reply.

I started up a TCP dump on the OpenVPN server and the packets that are coming from the Windows Client and destined for the Corporate Network are showing as having a source IP of the TUN IP (172.16.0.6) instead of the 10.162.139.31 IP.

Code: Select all

tcpdump -nS -i tun0
tcpdump: WARNING: arptype 65534 not supported by libpcap - falling back to cooked socket
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on tun0, link-type LINUX_SLL (Linux cooked), capture size 96 bytes
Dec  2 13:52:31 warcos1 kernel: device tun0 entered promiscuous mode
13:52:43.111975 IP 172.32.0.6 > 192.168.44.253: ICMP echo request, id 1, seq 451, length 40
13:52:48.192124 IP 172.32.0.6 > 192.168.44.253: ICMP echo request, id 1, seq 452, length 40
13:52:52.824674 IP 172.32.0.6 > 192.168.44.253: ICMP echo request, id 1, seq 453, length 40
13:52:57.461092 IP 172.32.0.6 > 192.168.44.253: ICMP echo request, id 1, seq 454, length 40
How can I make it that the source address is the 10.162.139.31 address?

server.conf

Code: Select all

local 192.168.44.64
port 1194
proto tcp
dev tun0
ca /etc/openvpn/certs/ca.crt
cert /etc/openvpn/certs/warcos1.crt
key /etc/openvpn/keys/warcos1.key  # This file should be kept secret
dh /etc/openvpn/dh2048.pem
server 172.32.0.0 255.255.255.0
ifconfig-pool-persist /etc/openvpn/ipp.txt
push "route 192.168.44.0 255.255.255.0"
client-config-dir client-configs
route 10.0.0.0 255.0.0.0
keepalive 10 120
cipher BF-CBC        # Blowfish (default)
max-clients 5
user nobody
group nobody
persist-key
persist-tun
status /var/log/openvpn-status.log
verb 5
daemon
client.conf

Code: Select all

client
dev tun
proto tcp
remote x.x.x.x 1194
nobind
persist-key
persist-tun
ca ca.crt
cert windows.crt
key windows.key
ns-cert-type server
cipher BF-CBC
verb 3

stevodevo
OpenVpn Newbie
Posts: 2
Joined: Thu Dec 02, 2010 3:44 am

Re: IP Routing Problem

Post by stevodevo » Thu Dec 02, 2010 6:47 am

Solved! I didn't have IP routing turned on.

http://prefetch.net/blog/index.php/2009 ... x-servers/

Post Reply