2 VM, share internet on guest XP through guest Ubuntu
Posted: 2. Jul 2013, 07:00
hello,
I'm using VB 4.2.14.r86644
I have host win XP, guest ubuntu and guest win XP. I need to pass internet to guest XP through guest ubuntu.
In properties of guest XP VM I set one network connection "local connection" with def name "intnet"
In properties of guest ubuntu VM I set 2 networks: first is NAT, second is local.
I have internet in ubuntu. "ifconfig" commang says, that I have 3 connections: lo, eth3 (local), eth2 (nat). I set local connection properties as Manual (in ipv4 section) and add 1 address:
169.243.236.100, mask 255.255.0.0 , gateway 0.0.0.0
I see my DNS in the properties of nat connection as 172.16.0.1, but if I do "nslookup" command, it gives me DNS info as -> server : 127.0.0.1, address: 127.0.0.1#53
In guest XP I change properties of local connection (TCP/IP) -> use ip 169.243.236.200, subnet mask 255.255.0.0 gateway 169.243.236.100. I set DNS to 172.16.0.1.
Now I do commands in ubuntu:
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -P FORWARD ACCEPT
sudo iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE
after that, it should work. but it doesnt :/ I think that the problem is in DNS, why ubuntu's command nslookup says 127.0.0.1 about DNS?
I'm using VB 4.2.14.r86644
I have host win XP, guest ubuntu and guest win XP. I need to pass internet to guest XP through guest ubuntu.
In properties of guest XP VM I set one network connection "local connection" with def name "intnet"
In properties of guest ubuntu VM I set 2 networks: first is NAT, second is local.
I have internet in ubuntu. "ifconfig" commang says, that I have 3 connections: lo, eth3 (local), eth2 (nat). I set local connection properties as Manual (in ipv4 section) and add 1 address:
169.243.236.100, mask 255.255.0.0 , gateway 0.0.0.0
I see my DNS in the properties of nat connection as 172.16.0.1, but if I do "nslookup" command, it gives me DNS info as -> server : 127.0.0.1, address: 127.0.0.1#53
In guest XP I change properties of local connection (TCP/IP) -> use ip 169.243.236.200, subnet mask 255.255.0.0 gateway 169.243.236.100. I set DNS to 172.16.0.1.
Now I do commands in ubuntu:
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -P FORWARD ACCEPT
sudo iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE
after that, it should work. but it doesnt :/ I think that the problem is in DNS, why ubuntu's command nslookup says 127.0.0.1 about DNS?