Running client and app using connection in different VMs?
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 8
- Joined: Tue Apr 30, 2013 9:40 am
Running client and app using connection in different VMs?
I want to run the OpenVPN client in one VirtualBox VM and use the tunnel provided by the client from another VM. The reason for this is that while running software acceptance tests I don't want to run the OpenVPN client on the same VM where the program using the VPN tunnel is running.
VirtualBox host OS is Windows Server 2003 or Win7. Guest OS is Server 2003 or WinXP.
How can i do this?
VirtualBox host OS is Windows Server 2003 or Win7. Guest OS is Server 2003 or WinXP.
How can i do this?
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Running client and app using connection in different VMs
This is definitely possible, but VirtualBox is notorious when it comes to routing between two VMs.
Set up openvpn in routed mode (mode tun) and set up routing in that VM; then set up the second VM and give it the first VM as the default gateway. After that, it is all a matter of routing
Set up openvpn in routed mode (mode tun) and set up routing in that VM; then set up the second VM and give it the first VM as the default gateway. After that, it is all a matter of routing

-
- OpenVpn Newbie
- Posts: 8
- Joined: Tue Apr 30, 2013 9:40 am
Re: Running client and app using connection in different VMs
Could you please show me in a little more detail how to do that? (I am a C# programmer and never had to mess around with routing and networking stuff, so my networking skills are somewhat limited, to say the least)
-
- OpenVpn Newbie
- Posts: 8
- Joined: Tue Apr 30, 2013 9:40 am
Re: Running client and app using connection in different VMs
I have tried, but can't make it work. I am stuck and would really appreciate some help on this.Set up openvpn in routed mode (mode tun) and set up routing in that VM; then set up the second VM and give it the first VM as the default gateway. After that, it is all a matter of routing

I have two VirtualBox VM's with network set to bridged adapter.
First VM (IP 10.0.0.8):
I started OpenVPN in this VM and logged in on vpnbook free using the following ovpn file (just for testing, I will eventually use other provider):
Code: Select all
client
dev tun0
proto udp
remote 93.115.84.194 53
remote euro1.vpnbook.com 53
resolv-retry infinite
nobind
persist-key
persist-tun
ca vpnbook-ca.crt
auth-user-pass
comp-lzo
verb 3
cipher AES-128-CBC
fast-io
pull
route-delay 2
redirect-gateway
Code: Select all
Wed May 22 16:29:59 2013 OpenVPN 2.3.1 i686-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [eurephia] [IPv6] built on Mar 28 2013
Wed May 22 16:29:59 2013 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
Wed May 22 16:29:59 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Wed May 22 16:29:59 2013 NOTE: --fast-io is disabled since we are running on Windows
Wed May 22 16:29:59 2013 Socket Buffers: R=[8192->8192] S=[8192->8192]
Wed May 22 16:29:59 2013 UDPv4 link local: [undef]
Wed May 22 16:29:59 2013 UDPv4 link remote: [AF_INET]93.115.84.194:53
Wed May 22 16:29:59 2013 TLS: Initial packet from [AF_INET]93.115.84.194:53, sid=6e77f58d 5e571031
Wed May 22 16:29:59 2013 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Wed May 22 16:30:00 2013 VERIFY OK: depth=1, C=CH, ST=Zurich, L=Zurich, O=vpnbook.com, OU=IT, CN=vpnbook.com, name=vpnbook.com, emailAddress=admin@vpnbook.com
Wed May 22 16:30:00 2013 VERIFY OK: depth=0, C=CH, ST=Zurich, L=Zurich, O=vpnbook.com, OU=IT, CN=vpnbook.com, name=vpnbook.com, emailAddress=admin@vpnbook.com
Wed May 22 16:30:00 2013 Data Channel Encrypt: Cipher 'AES-128-CBC' initialized with 128 bit key
Wed May 22 16:30:00 2013 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed May 22 16:30:00 2013 Data Channel Decrypt: Cipher 'AES-128-CBC' initialized with 128 bit key
Wed May 22 16:30:00 2013 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed May 22 16:30:00 2013 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Wed May 22 16:30:00 2013 [vpnbook.com] Peer Connection Initiated with [AF_INET]93.115.84.194:53
Wed May 22 16:30:03 2013 SENT CONTROL [vpnbook.com]: 'PUSH_REQUEST' (status=1)
Wed May 22 16:30:03 2013 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 1.2.3.4,dhcp-option DNS 1.2.3.5,route 10.8.0.1,topology net30,ping 5,ping-restart 30,ifconfig 10.8.0.130 10.8.0.129'
Wed May 22 16:30:03 2013 OPTIONS IMPORT: timers and/or timeouts modified
Wed May 22 16:30:03 2013 OPTIONS IMPORT: --ifconfig/up options modified
Wed May 22 16:30:03 2013 OPTIONS IMPORT: route options modified
Wed May 22 16:30:03 2013 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Wed May 22 16:30:03 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Wed May 22 16:30:03 2013 open_tun, tt->ipv6=0
Wed May 22 16:30:03 2013 TAP-WIN32 device [Local Area Connection 2] opened: \\.\Global\{A171C600-6DAB-4CF7-83E3-EBF6CEF6A36D}.tap
Wed May 22 16:30:03 2013 TAP-Windows Driver Version 9.9
Wed May 22 16:30:03 2013 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.130/255.255.255.252 on interface {A171C600-6DAB-4CF7-83E3-EBF6CEF6A36D} [DHCP-serv: 10.8.0.129, lease-time: 31536000]
Wed May 22 16:30:03 2013 Successful ARP Flush on interface [3] {A171C600-6DAB-4CF7-83E3-EBF6CEF6A36D}
Wed May 22 16:30:05 2013 TEST ROUTES: 0/0 succeeded len=1 ret=0 a=0 u/d=down
Wed May 22 16:30:05 2013 Route: Waiting for TUN/TAP interface to come up...
Wed May 22 16:30:07 2013 TEST ROUTES: 0/0 succeeded len=1 ret=0 a=0 u/d=down
Wed May 22 16:30:07 2013 Route: Waiting for TUN/TAP interface to come up...
Wed May 22 16:30:08 2013 TEST ROUTES: 0/0 succeeded len=1 ret=0 a=0 u/d=down
Wed May 22 16:30:08 2013 Route: Waiting for TUN/TAP interface to come up...
Wed May 22 16:30:09 2013 TEST ROUTES: 2/2 succeeded len=1 ret=1 a=0 u/d=up
Wed May 22 16:30:09 2013 C:\WINDOWS\system32\route.exe ADD 93.115.84.194 MASK 255.255.255.255 10.0.0.1
Wed May 22 16:30:09 2013 Route addition via IPAPI succeeded [adaptive]
Wed May 22 16:30:09 2013 C:\WINDOWS\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 10.8.0.129
Wed May 22 16:30:09 2013 Route addition via IPAPI succeeded [adaptive]
Wed May 22 16:30:09 2013 C:\WINDOWS\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 10.8.0.129
Wed May 22 16:30:09 2013 Route addition via IPAPI succeeded [adaptive]
Wed May 22 16:30:09 2013 C:\WINDOWS\system32\route.exe ADD 10.8.0.1 MASK 255.255.255.255 10.8.0.129
Wed May 22 16:30:09 2013 Route addition via IPAPI succeeded [adaptive]
Wed May 22 16:30:09 2013 Initialization Sequence Completed
Wed May 22 17:30:00 2013 TLS: soft reset sec=0 bytes=110395/0 pkts=1556/0
Wed May 22 17:30:01 2013 VERIFY OK: depth=1, C=CH, ST=Zurich, L=Zurich, O=vpnbook.com, OU=IT, CN=vpnbook.com, name=vpnbook.com, emailAddress=admin@vpnbook.com
Wed May 22 17:30:01 2013 VERIFY OK: depth=0, C=CH, ST=Zurich, L=Zurich, O=vpnbook.com, OU=IT, CN=vpnbook.com, name=vpnbook.com, emailAddress=admin@vpnbook.com
Wed May 22 17:30:01 2013 Data Channel Encrypt: Cipher 'AES-128-CBC' initialized with 128 bit key
Wed May 22 17:30:01 2013 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed May 22 17:30:01 2013 Data Channel Decrypt: Cipher 'AES-128-CBC' initialized with 128 bit key
Wed May 22 17:30:01 2013 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Wed May 22 17:30:01 2013 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
ipconfig and routs on first VM are now these:
Code: Select all
C:\>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : XP-SP3-net-nr2a
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : AMD PCNET Family PCI Ethernet Adapter
Physical Address. . . . . . . . . : 08-00-27-1F-E1-E9
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 10.0.0.8
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.0.1
DNS Servers . . . . . . . . . . . : 10.0.0.1
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : TAP-Windows Adapter V9
Physical Address. . . . . . . . . : 00-FF-A1-71-C6-00
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 10.8.0.130
Subnet Mask . . . . . . . . . . . : 255.255.255.252
Default Gateway . . . . . . . . . : 10.8.0.129
DHCP Server . . . . . . . . . . . : 10.8.0.129
DNS Servers . . . . . . . . . . . : 1.2.3.4
1.2.3.5
Lease Obtained. . . . . . . . . . : 22 may 2013 16:30:08
Lease Expires . . . . . . . . . . : 22 may 2014 16:30:08
C:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...08 00 27 1f e1 e9 ...... AMD PCNET Family PCI Ethernet Adapter - Packet Scheduler Miniport
0x3 ...00 ff a1 71 c6 00 ...... TAP-Windows Adapter V9 - Packet Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.0.1 10.0.0.8 1
0.0.0.0 128.0.0.0 10.8.0.129 10.8.0.130 1
10.0.0.0 255.255.255.0 10.0.0.8 10.0.0.8 20
10.0.0.8 255.255.255.255 127.0.0.1 127.0.0.1 20
10.8.0.1 255.255.255.255 10.8.0.129 10.8.0.130 1
10.8.0.128 255.255.255.252 10.8.0.130 10.8.0.130 30
10.8.0.130 255.255.255.255 127.0.0.1 127.0.0.1 30
10.255.255.255 255.255.255.255 10.0.0.8 10.0.0.8 20
10.255.255.255 255.255.255.255 10.8.0.130 10.8.0.130 30
93.115.84.194 255.255.255.255 10.0.0.1 10.0.0.8 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
128.0.0.0 128.0.0.0 10.8.0.129 10.8.0.130 1
224.0.0.0 240.0.0.0 10.0.0.8 10.0.0.8 20
224.0.0.0 240.0.0.0 10.8.0.130 10.8.0.130 30
255.255.255.255 255.255.255.255 10.0.0.8 10.0.0.8 1
255.255.255.255 255.255.255.255 10.8.0.130 10.8.0.130 1
Default Gateway: 10.8.0.129
===========================================================================
Persistent Routes:
None
This second VM should be able to use the internet connection provided by OpenVPN in the first VM above.
To set the first VM as default gateway for this second VM, I entered this command:
Code: Select all
route add 0.0.0.0 mask 128.0.0.0 10.0.0.8
But I can NOT ping 10.8.0.129 or 93.115.84.194 or 8.8.8.8 (no internet connection).
ipconfig and routs on second VM are these:
Code: Select all
C:\>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : XP-SP3-net-nr2b
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : AMD PCNET Family PCI Ethernet Adapter
Physical Address. . . . . . . . . : 08-00-27-1C-33-7B
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 10.0.0.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.0.1
10.0.0.8
DHCP Server . . . . . . . . . . . : 10.0.0.1
DNS Servers . . . . . . . . . . . : 10.0.0.1
Lease Obtained. . . . . . . . . . : 22 may 2013 16:20:27
Lease Expires . . . . . . . . . . : 23 may 2013 16:20:27
C:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...08 00 27 1c 33 7b ...... AMD PCNET Family PCI Ethernet Adapter - Packet Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.0.1 10.0.0.5 20
0.0.0.0 128.0.0.0 10.0.0.8 10.0.0.5 1
10.0.0.0 255.255.255.0 10.0.0.5 10.0.0.5 20
10.0.0.5 255.255.255.255 127.0.0.1 127.0.0.1 20
10.255.255.255 255.255.255.255 10.0.0.5 10.0.0.5 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
224.0.0.0 240.0.0.0 10.0.0.5 10.0.0.5 20
255.255.255.255 255.255.255.255 10.0.0.5 10.0.0.5 1
Default Gateway: 10.0.0.8
===========================================================================
Persistent Routes:
None
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Running client and app using connection in different VMs
in order to reach other machines the first VM must allow IP forwarding; your 'ipconfig /all' info shows
You can enable IP forwarding by setting a registry key and rebooting; see http://support.microsoft.com/kb/315236 for details.IP Routing Enabled. . . . . . . . : No
-
- OpenVpn Newbie
- Posts: 8
- Joined: Tue Apr 30, 2013 9:40 am
Re: Running client and app using connection in different VMs
I have enabled IP forwarding now on first VM, restarted VM and confirmed with 'ipconfig /all' that it is enabled.
Same as before. Second VM can ping first VM IP (10.0.0.8 and IP of OpenVPN interface) but can not ping 8.8.8.8 or any other public IP.
Same as before. Second VM can ping first VM IP (10.0.0.8 and IP of OpenVPN interface) but can not ping 8.8.8.8 or any other public IP.
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Running client and app using connection in different VMs
what happens if you run
in the first VM? can it reach that host? what route does it take?
Code: Select all
tracert -n 8.8.8.8
-
- OpenVpn Newbie
- Posts: 8
- Joined: Tue Apr 30, 2013 9:40 am
Re: Running client and app using connection in different VMs
Well, -n does not seem to be a valid command switch for tracert. But this works:
Since vpnbook give me a different local IP each time, I probably should also give you this:
Code: Select all
C:\>tracert 8.8.8.8
Tracing route to google-public-dns-a.google.com [8.8.8.8]
over a maximum of 30 hops:
1 87 ms 88 ms 88 ms 10.8.0.1
2 87 ms 87 ms 80 ms buc-ird-27sw.voxility.net [93.115.84.193]
3 79 ms 83 ms 80 ms buc-ird-01c.voxility.net [109.163.235.181]
4 82 ms 78 ms 84 ms buc-ird-03gw.voxility.net [109.163.235.153]
5 125 ms 115 ms 120 ms fra-anc-01gw.voxility.net [109.163.235.166]
6 157 ms 143 ms 155 ms de-cix20.net.google.com [80.81.193.108]
7 119 ms 123 ms 117 ms 72.14.238.44
8 123 ms 129 ms 114 ms 72.14.239.60
9 296 ms 308 ms 318 ms 209.85.254.112
10 * * * Request timed out.
11 116 ms 113 ms 115 ms google-public-dns-a.google.com [8.8.8.8]
Trace complete.
Code: Select all
C:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...08 00 27 1f e1 e9 ...... AMD PCNET Family PCI Ethernet Adapter - Packet Scheduler Miniport
0x3 ...00 ff a1 71 c6 00 ...... TAP-Windows Adapter V9 - Packet Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.0.1 10.0.0.8 1
0.0.0.0 128.0.0.0 10.8.1.149 10.8.1.150 1
10.0.0.0 255.255.255.0 10.0.0.8 10.0.0.8 20
10.0.0.8 255.255.255.255 127.0.0.1 127.0.0.1 20
10.8.0.1 255.255.255.255 10.8.1.149 10.8.1.150 1
10.8.1.148 255.255.255.252 10.8.1.150 10.8.1.150 30
10.8.1.150 255.255.255.255 127.0.0.1 127.0.0.1 30
10.255.255.255 255.255.255.255 10.0.0.8 10.0.0.8 20
10.255.255.255 255.255.255.255 10.8.1.150 10.8.1.150 30
93.115.84.194 255.255.255.255 10.0.0.1 10.0.0.8 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
128.0.0.0 128.0.0.0 10.8.1.149 10.8.1.150 1
224.0.0.0 240.0.0.0 10.0.0.8 10.0.0.8 20
224.0.0.0 240.0.0.0 10.8.1.150 10.8.1.150 30
255.255.255.255 255.255.255.255 10.0.0.8 10.0.0.8 1
255.255.255.255 255.255.255.255 10.8.1.150 10.8.1.150 1
Default Gateway: 10.8.1.149
===========================================================================
Persistent Routes:
None
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Running client and app using connection in different VMs
sorry about that, it should have been
what happens if you do this tracert from within the second VM? does it go straight to internet? what does the routing table on this client look like? the default route should point to the first VM .
Code: Select all
tracert -d
-
- OpenVpn Newbie
- Posts: 8
- Joined: Tue Apr 30, 2013 9:40 am
Re: Running client and app using connection in different VMs
I will give you the whole thing again for both VM's so you have it in one place, hopefully making it a little easier for you.
Host is Win7, VirtualBox 4.2.12.
First VM runs XP and OpenVPN connected to free vpnbook account. Routing is enabled on this VM.
Second VM runs XP and should be able to connect to internet using the OpenVPN connection in first VM.
I started first VM, and connected to vpnbook using OpenVPN 2.3.1 installed in this VM.
Then I started second VM and issued the following commands in it to set default gateway:
Then I issued commands to produce output listed below for each VM.
First VM:
Second VM
Host is Win7, VirtualBox 4.2.12.
First VM runs XP and OpenVPN connected to free vpnbook account. Routing is enabled on this VM.
Second VM runs XP and should be able to connect to internet using the OpenVPN connection in first VM.
I started first VM, and connected to vpnbook using OpenVPN 2.3.1 installed in this VM.
Then I started second VM and issued the following commands in it to set default gateway:
Code: Select all
route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 10.0.0.8
First VM:
Code: Select all
C:\>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : XP-SP3-net-nr2a
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : Yes
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : AMD PCNET Family PCI Ethernet Adapter
Physical Address. . . . . . . . . : 08-00-27-1F-E1-E9
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 10.0.0.8
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.0.1
DNS Servers . . . . . . . . . . . : 10.0.0.1
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : TAP-Windows Adapter V9
Physical Address. . . . . . . . . : 00-FF-A1-71-C6-00
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 10.8.0.94
Subnet Mask . . . . . . . . . . . : 255.255.255.252
Default Gateway . . . . . . . . . : 10.8.0.93
DHCP Server . . . . . . . . . . . : 10.8.0.93
DNS Servers . . . . . . . . . . . : 1.2.3.4
1.2.3.5
Lease Obtained. . . . . . . . . . : 23 may 2013 18:11:00
Lease Expires . . . . . . . . . . : 23 may 2014 18:11:00
C:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...08 00 27 1f e1 e9 ...... AMD PCNET Family PCI Ethernet Adapter - Packet Scheduler Miniport
0x3 ...00 ff a1 71 c6 00 ...... TAP-Windows Adapter V9 - Packet Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.0.1 10.0.0.8 1
0.0.0.0 128.0.0.0 10.8.0.93 10.8.0.94 1
10.0.0.0 255.255.255.0 10.0.0.8 10.0.0.8 20
10.0.0.8 255.255.255.255 127.0.0.1 127.0.0.1 20
10.8.0.1 255.255.255.255 10.8.0.93 10.8.0.94 1
10.8.0.92 255.255.255.252 10.8.0.94 10.8.0.94 30
10.8.0.94 255.255.255.255 127.0.0.1 127.0.0.1 30
10.255.255.255 255.255.255.255 10.0.0.8 10.0.0.8 20
10.255.255.255 255.255.255.255 10.8.0.94 10.8.0.94 30
93.115.84.194 255.255.255.255 10.0.0.1 10.0.0.8 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
128.0.0.0 128.0.0.0 10.8.0.93 10.8.0.94 1
224.0.0.0 240.0.0.0 10.0.0.8 10.0.0.8 20
224.0.0.0 240.0.0.0 10.8.0.94 10.8.0.94 30
255.255.255.255 255.255.255.255 10.0.0.8 10.0.0.8 1
255.255.255.255 255.255.255.255 10.8.0.94 10.8.0.94 1
Default Gateway: 10.8.0.93
===========================================================================
Persistent Routes:
None
C:\>tracert -d 8.8.8.8
Tracing route to 8.8.8.8 over a maximum of 30 hops
1 80 ms 80 ms 80 ms 10.8.0.1
2 89 ms 81 ms 89 ms 93.115.84.193
3 87 ms 79 ms 79 ms 109.163.235.181
4 * 80 ms 89 ms 109.163.235.153
5 * * * Request timed out.
6 180 ms 168 ms 181 ms 80.81.193.108
7 123 ms 122 ms 116 ms 72.14.238.44
8 139 ms 123 ms 119 ms 72.14.239.60
9 331 ms 334 ms 322 ms 209.85.254.112
10 * * * Request timed out.
11 117 ms 121 ms 120 ms 8.8.8.8
Trace complete.
Second VM
Code: Select all
C:\>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : XP-SP3-net-nr2b
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : AMD PCNET Family PCI Ethernet Adapter
Physical Address. . . . . . . . . : 08-00-27-1C-33-7B
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 10.0.0.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.0.8
DHCP Server . . . . . . . . . . . : 10.0.0.1
DNS Servers . . . . . . . . . . . : 10.0.0.1
Lease Obtained. . . . . . . . . . : 23 may 2013 18:08:26
Lease Expires . . . . . . . . . . : 24 may 2013 18:08:26
C:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...08 00 27 1c 33 7b ...... AMD PCNET Family PCI Ethernet Adapter - Packet Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.0.8 10.0.0.5 1
10.0.0.0 255.255.255.0 10.0.0.5 10.0.0.5 20
10.0.0.5 255.255.255.255 127.0.0.1 127.0.0.1 20
10.255.255.255 255.255.255.255 10.0.0.5 10.0.0.5 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
224.0.0.0 240.0.0.0 10.0.0.5 10.0.0.5 20
255.255.255.255 255.255.255.255 10.0.0.5 10.0.0.5 1
Default Gateway: 10.0.0.8
===========================================================================
Persistent Routes:
None
C:\>tracert -d 8.8.8.8
Tracing route to 8.8.8.8 over a maximum of 30 hops
1 <1 ms <1 ms <1 ms 10.0.0.8
2 * * * Request timed out.
3 * * * Request timed out.
4 * * * Request timed out.
5 * * * Request timed out.
6 * * * Request timed out.
7 * * * Request timed out.
8 * * * Request timed out.
9 * * * Request timed out.
10 * * * Request timed out.
11 * * * Request timed out.
12 * * * Request timed out.
13 * * * Request timed out.
14 * * * Request timed out.
15 * * * Request timed out.
16 * * * Request timed out.
17 * * * Request timed out.
18 * * * Request timed out.
19 * * * Request timed out.
20 * * * Request timed out.
21 * * * Request timed out.
22 * * * Request timed out.
23 * * * Request timed out.
24 * * * Request timed out.
25 * * * Request timed out.
26 * * * Request timed out.
27 * * * Request timed out.
28 * * * Request timed out.
29 * * * Request timed out.
30 * * * Request timed out.
Trace complete.
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Running client and app using connection in different VMs
oh of course!
a packet from 10.0.0.5 is sent to 10.0.0.8; this packet should then be injected into the tunnel. However, the VPN *server* does not anything about this subnet; you'll need to set up some form of masquerading (this can be done using RRAS - it's so much easier on Linux
)).
there is a post on this forum by a user Bebop about how to set this up in a Windows environment.
a packet from 10.0.0.5 is sent to 10.0.0.8; this packet should then be injected into the tunnel. However, the VPN *server* does not anything about this subnet; you'll need to set up some form of masquerading (this can be done using RRAS - it's so much easier on Linux

there is a post on this forum by a user Bebop about how to set this up in a Windows environment.
-
- OpenVpn Newbie
- Posts: 8
- Joined: Tue Apr 30, 2013 9:40 am
Re: Running client and app using connection in different VMs
Wow, Yessss, Yippi!!! Its working!
Thank you so much Jan for all your excellent help. And thank you Bebop for your howto's.
The solution was to enable Internet Connection Sharing on the TAP interface for OpenVPN in the first VM.
Howto for Win-XP: topic7815.html
Howto for Win7: topic7806.html
Thank you so much Jan for all your excellent help. And thank you Bebop for your howto's.
The solution was to enable Internet Connection Sharing on the TAP interface for OpenVPN in the first VM.
Howto for Win-XP: topic7815.html
Howto for Win7: topic7806.html
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Running client and app using connection in different VMs
Excellent news, closing topic