How do I route host's connection through guest?
Posted: 30. Aug 2008, 17:00
Ubuntua 8.04 host, WinXP guest, Virtualbox 1.5.6, installed bridge-utils and uml-utilities.
I have to use the Nortel Contivity client to connect to my company. I can't get any of the sources to compile so I installed the Apani VPN client on the WinXP guest. Works! But once the client is connected, I want to connect to my company's Sun box and run XWindows programs, redirecting the DISPLAY back to my Ubuntu host. I can already run mstsc.exe on the client and login to my company's WinXP box. I can also telnet from guest to my Sun box.
Thinking the solution will involve a bridge, I've given the host an IP of 192.168.1.50, and the guest, 192.168.1.60. After connecting, the client's IP becomes 172.21.7.47, and the client's domain servers become those of my company.
vbox->Settings->Network: Adaptor 0, Host Interface Settings:
Interface name is blank, Setup Application is a script that looks like:
The two lines that talk about "interface" arranges for the tunnel id (always 0, so far) to be a parameter to a script which undoes all the networking stuff.
What further do I have to do on the host to interact with the world through the guest?
I have to use the Nortel Contivity client to connect to my company. I can't get any of the sources to compile so I installed the Apani VPN client on the WinXP guest. Works! But once the client is connected, I want to connect to my company's Sun box and run XWindows programs, redirecting the DISPLAY back to my Ubuntu host. I can already run mstsc.exe on the client and login to my company's WinXP box. I can also telnet from guest to my Sun box.
Thinking the solution will involve a bridge, I've given the host an IP of 192.168.1.50, and the guest, 192.168.1.60. After connecting, the client's IP becomes 172.21.7.47, and the client's domain servers become those of my company.
vbox->Settings->Network: Adaptor 0, Host Interface Settings:
Interface name is blank, Setup Application is a script that looks like:
Code: Select all
#!/bin/bash
brctl addbr br0
ifconfig eth0 0.0.0.0 promisc
ifconfig br0 192.168.1.50 netmask 255.255.255.0 up
route add -net 192.168.1.0 netmask 255.255.255.0 br0
route add default gw 192.168.1.1 br0
brctl addif br0 eth0
interface=`VBoxTunctl -b -u username`
ifconfig tap0 up
brctl addif br0 tap0
iptables -I INPUT -i br0 -j ACCEPT
echo "$interface"
exit
What further do I have to do on the host to interact with the world through the guest?