need to route windows xp traffic through openvpn client
Posted: Sat May 21, 2011 3:03 pm
Hello, I am new to OpenVPN but have some reasonable understanding of how it works.
What I'd like to do is connect my Windows XP OpenVPN client to a CentOS VPN server and route all web traffic through the VPN server. On the server I have this configuration which cannot be modified because it gets overwritten:
# Automatically generated by Plesk VPN module
#
rport 1194
lport 1194
ifconfig 172.16.0.1 255.255.255.252
daemon
secret /usr/local/psa/var/modules/vpn/vpn-key
writepid /usr/local/psa/var/modules/vpn/openvpn.pid
mtu-disc yes
comp-lzo
dev tap
float
keepalive 10 60
ping-timer-rem
resolv-retry infinite
On the client I have the vpn key and this configuration:
#
# Automatically generated by Plesk VPN module
#
remote ns1.vivhost.com
lport 1194
rport 1194
ifconfig 172.16.0.2 255.255.255.252
secret system/vpn-key
comp-lzo
dev tap
float
keepalive 10 60
ping-timer-rem
resolv-retry infinite
route-gateway 172.16.0.1
redirect-gateway def1
dhcp-option DNS 172.16.0.1
startup client openvpn reports:
Sat May 21 16:50:53 2011 OpenVPN 2.0 Win32-MinGW [SSL] [LZO] built on Apr 17 200
5
Sat May 21 16:50:53 2011 LZO compression initialized
Sat May 21 16:50:53 2011 TAP-WIN32 device [TAP] opened: \\.\Global\{342D9C9C-107
A-41AC-BFA7-995C48654BEF}.tap
Sat May 21 16:50:53 2011 Notified TAP-Win32 driver to set a DHCP IP/netmask of 1
72.16.0.2/255.255.255.252 on interface {342D9C9C-107A-41AC-BFA7-995C48654BEF} [D
HCP-serv: 172.16.0.0, lease-time: 31536000]
Sat May 21 16:50:53 2011 Successful ARP Flush on interface [131078] {342D9C9C-10
7A-41AC-BFA7-995C48654BEF}
Sat May 21 16:50:53 2011 UDPv4 link local (bound): [undef]:1194
Sat May 21 16:50:53 2011 UDPv4 link remote: 95.211.120.206:1194
Sat May 21 16:50:59 2011 Peer Connection Initiated with 95.211.120.206:1194
Sat May 21 16:51:00 2011 Initialization Sequence Completed
ipconfig /all reports:
[c:\4nt]ipconfig /all
Windows IP-configuratie
Host-naam . . . . . . . . . . . .: UPSTAIRS
Primair DNS-achtervoegsel. . . . .:
Knooppunttype . . . . . . . . . . : gemengd
IP-routering ingeschakeld. . . . .: nee
WINS-proxy ingeschakeld . . . . . : nee
Ethernet-adapter LAN-verbinding:
Verbindingsspec. DNS-achtervoegsel:
Beschrijving . . . . . . . . . . .:
Realtek RTL8139/810x Family Fast Ethernet NIC
Fysiek adres. . . . . . . . . . . : 00-13-D3-29-E6-B6
DHCP ingeshakeld. . . . . . . . . : ja
Autom. configuratie ingeschakeld. : ja
IP-adres. . . . . . . . . . . . . : 192.168.1.15
Subnetmasker. . . . . . . . . . . : 255.255.255.0
Standaardgateway. . . . . . . . . : 192.168.1.1
DHCP-server . . . . . . . . . . . : 192.168.1.1
DNS-servers . . . . . . . . . . . : 8.8.8.8
8.8.4.4
Lease verkregen . . . . . . . . . : Saturday, May 21, 2011 4:52:07 PM
Lease verlopen . . . . . . . . . : Tuesday, May 24, 2011 4:52:07 PM
Ethernet-adapter TAP:
Verbindingsspec. DNS-achtervoegsel:
Beschrijving . . . . . . . . . . .:
TAP-Win32 Adapter V8
Fysiek adres. . . . . . . . . . . : 00-FF-34-2D-9C-9C
DHCP ingeshakeld. . . . . . . . . : ja
Autom. configuratie ingeschakeld. : ja
IP-adres. . . . . . . . . . . . . : 172.16.0.2
Subnetmasker. . . . . . . . . . . : 255.255.255.252
Standaardgateway. . . . . . . . . : 172.16.0.1
DHCP-server . . . . . . . . . . . : 172.16.0.0
DNS-servers . . . . . . . . . . . : 172.16.0.1
Lease verkregen . . . . . . . . . : Saturday, May 21, 2011 4:50:56 PM
Lease verlopen . . . . . . . . . : Sunday, May 20, 2012 4:50:56 PM
I can ping from Windows to the VPN server and back with no problem.
However I cannot figure out how to set the default gateway to the VPN server and to route all the Windows XP traffic through the VPN server. I've searched and read all I could find about it and it's still not clear to me how this is done on the client side. Thanks in advance for your help.
What I'd like to do is connect my Windows XP OpenVPN client to a CentOS VPN server and route all web traffic through the VPN server. On the server I have this configuration which cannot be modified because it gets overwritten:
# Automatically generated by Plesk VPN module
#
rport 1194
lport 1194
ifconfig 172.16.0.1 255.255.255.252
daemon
secret /usr/local/psa/var/modules/vpn/vpn-key
writepid /usr/local/psa/var/modules/vpn/openvpn.pid
mtu-disc yes
comp-lzo
dev tap
float
keepalive 10 60
ping-timer-rem
resolv-retry infinite
On the client I have the vpn key and this configuration:
#
# Automatically generated by Plesk VPN module
#
remote ns1.vivhost.com
lport 1194
rport 1194
ifconfig 172.16.0.2 255.255.255.252
secret system/vpn-key
comp-lzo
dev tap
float
keepalive 10 60
ping-timer-rem
resolv-retry infinite
route-gateway 172.16.0.1
redirect-gateway def1
dhcp-option DNS 172.16.0.1
startup client openvpn reports:
Sat May 21 16:50:53 2011 OpenVPN 2.0 Win32-MinGW [SSL] [LZO] built on Apr 17 200
5
Sat May 21 16:50:53 2011 LZO compression initialized
Sat May 21 16:50:53 2011 TAP-WIN32 device [TAP] opened: \\.\Global\{342D9C9C-107
A-41AC-BFA7-995C48654BEF}.tap
Sat May 21 16:50:53 2011 Notified TAP-Win32 driver to set a DHCP IP/netmask of 1
72.16.0.2/255.255.255.252 on interface {342D9C9C-107A-41AC-BFA7-995C48654BEF} [D
HCP-serv: 172.16.0.0, lease-time: 31536000]
Sat May 21 16:50:53 2011 Successful ARP Flush on interface [131078] {342D9C9C-10
7A-41AC-BFA7-995C48654BEF}
Sat May 21 16:50:53 2011 UDPv4 link local (bound): [undef]:1194
Sat May 21 16:50:53 2011 UDPv4 link remote: 95.211.120.206:1194
Sat May 21 16:50:59 2011 Peer Connection Initiated with 95.211.120.206:1194
Sat May 21 16:51:00 2011 Initialization Sequence Completed
ipconfig /all reports:
[c:\4nt]ipconfig /all
Windows IP-configuratie
Host-naam . . . . . . . . . . . .: UPSTAIRS
Primair DNS-achtervoegsel. . . . .:
Knooppunttype . . . . . . . . . . : gemengd
IP-routering ingeschakeld. . . . .: nee
WINS-proxy ingeschakeld . . . . . : nee
Ethernet-adapter LAN-verbinding:
Verbindingsspec. DNS-achtervoegsel:
Beschrijving . . . . . . . . . . .:
Realtek RTL8139/810x Family Fast Ethernet NIC
Fysiek adres. . . . . . . . . . . : 00-13-D3-29-E6-B6
DHCP ingeshakeld. . . . . . . . . : ja
Autom. configuratie ingeschakeld. : ja
IP-adres. . . . . . . . . . . . . : 192.168.1.15
Subnetmasker. . . . . . . . . . . : 255.255.255.0
Standaardgateway. . . . . . . . . : 192.168.1.1
DHCP-server . . . . . . . . . . . : 192.168.1.1
DNS-servers . . . . . . . . . . . : 8.8.8.8
8.8.4.4
Lease verkregen . . . . . . . . . : Saturday, May 21, 2011 4:52:07 PM
Lease verlopen . . . . . . . . . : Tuesday, May 24, 2011 4:52:07 PM
Ethernet-adapter TAP:
Verbindingsspec. DNS-achtervoegsel:
Beschrijving . . . . . . . . . . .:
TAP-Win32 Adapter V8
Fysiek adres. . . . . . . . . . . : 00-FF-34-2D-9C-9C
DHCP ingeshakeld. . . . . . . . . : ja
Autom. configuratie ingeschakeld. : ja
IP-adres. . . . . . . . . . . . . : 172.16.0.2
Subnetmasker. . . . . . . . . . . : 255.255.255.252
Standaardgateway. . . . . . . . . : 172.16.0.1
DHCP-server . . . . . . . . . . . : 172.16.0.0
DNS-servers . . . . . . . . . . . : 172.16.0.1
Lease verkregen . . . . . . . . . : Saturday, May 21, 2011 4:50:56 PM
Lease verlopen . . . . . . . . . : Sunday, May 20, 2012 4:50:56 PM
I can ping from Windows to the VPN server and back with no problem.
However I cannot figure out how to set the default gateway to the VPN server and to route all the Windows XP traffic through the VPN server. I've searched and read all I could find about it and it's still not clear to me how this is done on the client side. Thanks in advance for your help.