Bridge connected, but cant ping client-server or server-clie
Posted: Wed Aug 10, 2011 4:09 pm
Hi Folks.
I'm setting up a test/demonstration network for OpenVPN in VirtualBox and I've run into a problem setting up a bridged connection. OpenVPN connects, and the client gets an appropriate address from the openVPN server but I am unable to ping from the client to the server or from the server to the client.
Network details.
I created two host-only adapters in virtualbox,
vboxnet0:
192.168.56.0 netmask 255.255.255.0
dhcp address range 192.168.56.3 - 192.168.56.254
vboxnet1
192.168.57.0 netmask 255.255.255.0
dhcp address range 192.168.57.3 - 192.168.57.254
On each vboxnet interface I have a linux server vm acting as a router with 2 NIC's, one external, one internal.
Router0
eth0 static 192.168.15.10
eth1 static 192.168.56.2
Router1
eth0 static 192.168.15.20
eth1 static 192.168.57.2
On the internal side of router0 I have a windowsXP VM
eth0 static 192.168.56.3
To be the VPN Server in Bridged mode.
On the internal side of router1 I have a windowsXP vm
eth0 static 192.168.57.3
To be the VPN Client in Bridged mode.
Before configuring vpn I am able to ping from 192.168.57.3 to 192.168.56.3 and vice versa.
I originally configured this network in routed mode using instructions from http://openvpn.net/index.php/open-sourc ... howto.html and everything seemed to work just fine.
Using the same how-to, along with http://www.pavelec.net/adam/openvpn/bridge/ I attempted to convert the network to use Bridged mode.
SERVER:
Initial Settings:
Local Area Connection: 192.168.56.3, netmask 255.255.255.0, gateway 192.168.56.2, dns 192.186.15.1
Tap-32 adapter renamed to OpenVPN: DHCP
I bridged these two adapters to and renamed the bridge to “Bridge”, then set it's network settings to 192.168.56.3, netmask 255.255.255.0, gateway 192.168.56.2, dns 192.168.15.1
In Server.ovpn I have the following settings. (all settings not commented out are listed here)
port 1194
proto udp
dev tap
dev-node OpenVPN
ca "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ca.crt"
cert "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\server.crt"
key "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\server.key" # This file should be kept secret
dh "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\dh1024.pem"
server-bridge 192.168.56.3 255.255.255.0 192.168.56.128 192.168.56.254
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 6
On the Client I have the following settings.
Local area network: 192.168.57.3, netmask 255.255.255.0, gateway 192.168.57.2 dns 192.168.15.1
Tap-32 adapter, renamed to “OpenVPN”: DHCP
In client.ovpn I have:
client
dev tap
dev-node "OpenVPN"
proto udp
remote 192.168.56.3 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
ns-cert-type server
comp-lzo
verb 6
When I start the server, I get:
...
Wed Aug 10 08:58:04 2011 us=1000 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Aug 10 08:58:04 2011 us=91000 Diffie-Hellman initialized with 1024 bit key
Wed Aug 10 08:58:04 2011 us=91000 TLS-Auth MTU parms [ L:1574 D:138 EF:38 EB:0 ET:0 EL:0 ]
Wed Aug 10 08:58:04 2011 us=91000 Socket Buffers: R=[8192->8192] S=[8192->8192]
Wed Aug 10 08:58:04 2011 us=101000 TAP-WIN32 device [OpenVPN] opened: \\.\Global\{5CAD83AE-E049-4A07-A6BF-11958B7ED6EC}.tap
Wed Aug 10 08:58:04 2011 us=101000 NOTE: could not get adapter index for {5CAD83AE-E049-4A07-A6BF-11958B7ED6EC}
Wed Aug 10 08:58:04 2011 us=101000 TAP-Win32 Driver Version 9.8
Wed Aug 10 08:58:04 2011 us=101000 TAP-Win32 MTU=1500
Wed Aug 10 08:58:04 2011 us=101000 Sleeping for 10 seconds...
Wed Aug 10 08:58:14 2011 us=105000 Data Channel MTU parms [ L:1574 D:1450 EF:42 EB:135 ET:32 EL:0 AF:3/1 ]
Wed Aug 10 08:58:14 2011 us=105000 UDPv4 link local (bound): [undef]:1194
Wed Aug 10 08:58:14 2011 us=105000 UDPv4 link remote: [undef]
Wed Aug 10 08:58:14 2011 us=105000 MULTI: multi_init called, r=256 v=256
Wed Aug 10 08:58:14 2011 us=105000 IFCONFIG POOL: base=192.168.56.128 size=127
Wed Aug 10 08:58:14 2011 us=105000 IFCONFIG POOL LIST
Wed Aug 10 08:58:14 2011 us=105000 client1,192.168.56.128
Wed Aug 10 08:58:14 2011 us=105000 server,192.168.56.129
Wed Aug 10 08:58:14 2011 us=105000 Initialization Sequence Completed
When I start the client, I get:
...
Wed Aug 10 08:59:34 2011 us=495000 WARNING: --remote address [192.168.56.3] conflicts with --ifconfig subnet [192.168.56.129, 255.255.255.0] -- local and remote addresses cannot be inside of the --ifconfig subnet. (silence this warning with --ifconfig-nowarn)
Wed Aug 10 08:59:34 2011 us=515000 TAP-WIN32 device [OpenVPN] opened: \\.\Global\{C97938FB-C1A4-4CF1-9978-3E384D9C6065}.tap
Wed Aug 10 08:59:34 2011 us=515000 TAP-Win32 Driver Version 9.8
Wed Aug 10 08:59:34 2011 us=515000 TAP-Win32 MTU=1500
Wed Aug 10 08:59:34 2011 us=515000 Notified TAP-Win32 driver to set a DHCP IP/netmask of 192.168.56.129/255.255.255.0 on interface {C97938FB-C1A4-4CF1-9978-3E384D9C6065} [DHCP-serv: 192.168.56.0, lease-time: 31536000]
Wed Aug 10 08:59:34 2011 us=525000 Successful ARP Flush on interface [3] {C97938FB-C1A4-4CF1-9978-3E384D9C6065}
Wed Aug 10 08:59:34 2011 us=525000 UDPv4 WRITE [22] to 192.168.56.3:1194: P_ACK_V1 kid=0 [ 45 ]
Wed Aug 10 08:59:35 2011 us=387000 UDPv4 READ [93] from 192.168.56.3:1194: P_DATA_V1 kid=0 DATA len=92
Wed Aug 10 08:59:35 2011 us=397000 TUN WRITE [52]
...
Client and server appear to be connected, and the client has received an IP address of 192.168.56.129 but I am unable to ping from the client to any address on the 192.168.56.0/24 range, and I am unable to ping from the server to 192.168.56.129
Can anyone tell me where I went wrong in this setup? Any help would be greatly appreciated.
Thanks. DJ
I'm setting up a test/demonstration network for OpenVPN in VirtualBox and I've run into a problem setting up a bridged connection. OpenVPN connects, and the client gets an appropriate address from the openVPN server but I am unable to ping from the client to the server or from the server to the client.
Network details.
I created two host-only adapters in virtualbox,
vboxnet0:
192.168.56.0 netmask 255.255.255.0
dhcp address range 192.168.56.3 - 192.168.56.254
vboxnet1
192.168.57.0 netmask 255.255.255.0
dhcp address range 192.168.57.3 - 192.168.57.254
On each vboxnet interface I have a linux server vm acting as a router with 2 NIC's, one external, one internal.
Router0
eth0 static 192.168.15.10
eth1 static 192.168.56.2
Router1
eth0 static 192.168.15.20
eth1 static 192.168.57.2
On the internal side of router0 I have a windowsXP VM
eth0 static 192.168.56.3
To be the VPN Server in Bridged mode.
On the internal side of router1 I have a windowsXP vm
eth0 static 192.168.57.3
To be the VPN Client in Bridged mode.
Before configuring vpn I am able to ping from 192.168.57.3 to 192.168.56.3 and vice versa.
I originally configured this network in routed mode using instructions from http://openvpn.net/index.php/open-sourc ... howto.html and everything seemed to work just fine.
Using the same how-to, along with http://www.pavelec.net/adam/openvpn/bridge/ I attempted to convert the network to use Bridged mode.
SERVER:
Initial Settings:
Local Area Connection: 192.168.56.3, netmask 255.255.255.0, gateway 192.168.56.2, dns 192.186.15.1
Tap-32 adapter renamed to OpenVPN: DHCP
I bridged these two adapters to and renamed the bridge to “Bridge”, then set it's network settings to 192.168.56.3, netmask 255.255.255.0, gateway 192.168.56.2, dns 192.168.15.1
In Server.ovpn I have the following settings. (all settings not commented out are listed here)
port 1194
proto udp
dev tap
dev-node OpenVPN
ca "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ca.crt"
cert "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\server.crt"
key "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\server.key" # This file should be kept secret
dh "c:\\Program Files\\OpenVPN\\easy-rsa\\keys\\dh1024.pem"
server-bridge 192.168.56.3 255.255.255.0 192.168.56.128 192.168.56.254
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 6
On the Client I have the following settings.
Local area network: 192.168.57.3, netmask 255.255.255.0, gateway 192.168.57.2 dns 192.168.15.1
Tap-32 adapter, renamed to “OpenVPN”: DHCP
In client.ovpn I have:
client
dev tap
dev-node "OpenVPN"
proto udp
remote 192.168.56.3 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
ns-cert-type server
comp-lzo
verb 6
When I start the server, I get:
...
Wed Aug 10 08:58:04 2011 us=1000 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed Aug 10 08:58:04 2011 us=91000 Diffie-Hellman initialized with 1024 bit key
Wed Aug 10 08:58:04 2011 us=91000 TLS-Auth MTU parms [ L:1574 D:138 EF:38 EB:0 ET:0 EL:0 ]
Wed Aug 10 08:58:04 2011 us=91000 Socket Buffers: R=[8192->8192] S=[8192->8192]
Wed Aug 10 08:58:04 2011 us=101000 TAP-WIN32 device [OpenVPN] opened: \\.\Global\{5CAD83AE-E049-4A07-A6BF-11958B7ED6EC}.tap
Wed Aug 10 08:58:04 2011 us=101000 NOTE: could not get adapter index for {5CAD83AE-E049-4A07-A6BF-11958B7ED6EC}
Wed Aug 10 08:58:04 2011 us=101000 TAP-Win32 Driver Version 9.8
Wed Aug 10 08:58:04 2011 us=101000 TAP-Win32 MTU=1500
Wed Aug 10 08:58:04 2011 us=101000 Sleeping for 10 seconds...
Wed Aug 10 08:58:14 2011 us=105000 Data Channel MTU parms [ L:1574 D:1450 EF:42 EB:135 ET:32 EL:0 AF:3/1 ]
Wed Aug 10 08:58:14 2011 us=105000 UDPv4 link local (bound): [undef]:1194
Wed Aug 10 08:58:14 2011 us=105000 UDPv4 link remote: [undef]
Wed Aug 10 08:58:14 2011 us=105000 MULTI: multi_init called, r=256 v=256
Wed Aug 10 08:58:14 2011 us=105000 IFCONFIG POOL: base=192.168.56.128 size=127
Wed Aug 10 08:58:14 2011 us=105000 IFCONFIG POOL LIST
Wed Aug 10 08:58:14 2011 us=105000 client1,192.168.56.128
Wed Aug 10 08:58:14 2011 us=105000 server,192.168.56.129
Wed Aug 10 08:58:14 2011 us=105000 Initialization Sequence Completed
When I start the client, I get:
...
Wed Aug 10 08:59:34 2011 us=495000 WARNING: --remote address [192.168.56.3] conflicts with --ifconfig subnet [192.168.56.129, 255.255.255.0] -- local and remote addresses cannot be inside of the --ifconfig subnet. (silence this warning with --ifconfig-nowarn)
Wed Aug 10 08:59:34 2011 us=515000 TAP-WIN32 device [OpenVPN] opened: \\.\Global\{C97938FB-C1A4-4CF1-9978-3E384D9C6065}.tap
Wed Aug 10 08:59:34 2011 us=515000 TAP-Win32 Driver Version 9.8
Wed Aug 10 08:59:34 2011 us=515000 TAP-Win32 MTU=1500
Wed Aug 10 08:59:34 2011 us=515000 Notified TAP-Win32 driver to set a DHCP IP/netmask of 192.168.56.129/255.255.255.0 on interface {C97938FB-C1A4-4CF1-9978-3E384D9C6065} [DHCP-serv: 192.168.56.0, lease-time: 31536000]
Wed Aug 10 08:59:34 2011 us=525000 Successful ARP Flush on interface [3] {C97938FB-C1A4-4CF1-9978-3E384D9C6065}
Wed Aug 10 08:59:34 2011 us=525000 UDPv4 WRITE [22] to 192.168.56.3:1194: P_ACK_V1 kid=0 [ 45 ]
Wed Aug 10 08:59:35 2011 us=387000 UDPv4 READ [93] from 192.168.56.3:1194: P_DATA_V1 kid=0 DATA len=92
Wed Aug 10 08:59:35 2011 us=397000 TUN WRITE [52]
...
Client and server appear to be connected, and the client has received an IP address of 192.168.56.129 but I am unable to ping from the client to any address on the 192.168.56.0/24 range, and I am unable to ping from the server to 192.168.56.129
Can anyone tell me where I went wrong in this setup? Any help would be greatly appreciated.
Thanks. DJ