OpenVPN Server on Win2003 - outbound to client bypassing tun
Posted: Thu Apr 26, 2012 4:16 pm
I am running OpenVPN as a server on a Windows system behind a firewall. I have a device (SIP phone) that is establishing the tunnel from outside the firewall through port mapping to my Windows system. The device sends its SIP packets correctly to the server which the server receives and attempts to respond.
The problem is that the server is sending the SIP response packet to its default gateway and not back through the OpenVPN tunnel.
My config for the server is as follows:
port 1199
dev tun
proto tcp
server 10.3.230.0 255.255.255.0
cipher AES-128-CBC
ca ca.crt
dh dh1024.pem
cert client1.crt
key client1.key
resolv-retry infinite
persist-key
persist-tun
keepalive 10 100
script-security 3 system
auth-user-pass-verify login.bat via-env
tls-exit
push "route 10.1.0.0 255.255.0.0"
push "route 10.3.222.0 255.255.255.0"
push "route 10.3.223.0 255.255.255.0"
push "route 10.3.224.0 255.255.255.0"
push "route 10.3.225.0 255.255.255.0"
client-cert-not-required
username-as-common-name
When Open VPN is enabled the following gets added to the Routes (displayed from Route Print):
Dest Netmask Gateway Interface Metric
10.3.230.0 255.255.255.252 10.3.230.1 10.3.230.1 30
10.3.230.1 255.255.255.255 127.0.0.1 127.0.0.1 30
10.255.255.255 255.255.255.255 10.3.230.1 10.3.230.1 30
224.0.0.0 240.0.0.0 10.3.230.1 10.3.230.1 30
255.255.255.255 255.255.255.255 10.3.230.1 10.3.230.1 1
The address assigned to my device is 10.3.230.6. Why is the netmask for 10.3.230.0 at 255.255.255.252? I thought the "server 10.3.230.0 255.255.255.0" would make the route the same. The TAP NIC also shows the 255.255.255.252 address.
Thanks for any help.
The problem is that the server is sending the SIP response packet to its default gateway and not back through the OpenVPN tunnel.
My config for the server is as follows:
port 1199
dev tun
proto tcp
server 10.3.230.0 255.255.255.0
cipher AES-128-CBC
ca ca.crt
dh dh1024.pem
cert client1.crt
key client1.key
resolv-retry infinite
persist-key
persist-tun
keepalive 10 100
script-security 3 system
auth-user-pass-verify login.bat via-env
tls-exit
push "route 10.1.0.0 255.255.0.0"
push "route 10.3.222.0 255.255.255.0"
push "route 10.3.223.0 255.255.255.0"
push "route 10.3.224.0 255.255.255.0"
push "route 10.3.225.0 255.255.255.0"
client-cert-not-required
username-as-common-name
When Open VPN is enabled the following gets added to the Routes (displayed from Route Print):
Dest Netmask Gateway Interface Metric
10.3.230.0 255.255.255.252 10.3.230.1 10.3.230.1 30
10.3.230.1 255.255.255.255 127.0.0.1 127.0.0.1 30
10.255.255.255 255.255.255.255 10.3.230.1 10.3.230.1 30
224.0.0.0 240.0.0.0 10.3.230.1 10.3.230.1 30
255.255.255.255 255.255.255.255 10.3.230.1 10.3.230.1 1
The address assigned to my device is 10.3.230.6. Why is the netmask for 10.3.230.0 at 255.255.255.252? I thought the "server 10.3.230.0 255.255.255.0" would make the route the same. The TAP NIC also shows the 255.255.255.252 address.
Thanks for any help.