Page 1 of 1

2 VM, share internet on guest XP through guest Ubuntu

Posted: 2. Jul 2013, 07:00
by fjod
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?

Re: 2 VM, share internet on guest XP through guest Ubuntu

Posted: 2. Jul 2013, 22:37
by noteirak
I am afraid you are lacking a great deal of networking knowledge to actually implement what you are trying to do.
Seems like you found some howtos on Internet on how to share a connection/create a router of a Linux box but are mixing everything up.

I would strongly recommend reading a lot more about networking and its basic, as what you are trying to do is not into the "beginner" kind of lab.
Also, Virtualbox is a hardware simulator and networking configuration is totally out of scope of this forum, even more so since you do not have the required knowledge & understanding for this kind of setup.

My very strong and friendly advice is to seek help in a networking forum and read more about networking in general before going against such tests.

Re: 2 VM, share internet on guest XP through guest Ubuntu

Posted: 3. Jul 2013, 06:04
by fjod
noteirak wrote:I am afraid you are lacking a great deal of networking knowledge to actually implement what you are trying to do.
Seems like you found some howtos on Internet on how to share a connection/create a router of a Linux box but are mixing everything up.
this is true :)
noteirak wrote: I would strongly recommend reading a lot more about networking and its basic, as what you are trying to do is not into the "beginner" kind of lab.
could you recommend some books on networking? "howtos" that I found start from setting such network.

thanks for your time.