Page 1 of 1

virtual server with 2 ethernet and 2 client

Posted: 8. Jan 2009, 23:20
by richardsith
hi guys,
I'm new here and I need help for a problem with virtualbox. I mean I created a virtual server with 2 ethernet, one of these is configurated as nat (eth0) and the other one as internal network with ip 192.168.0.1. the rest, the virtual clients, have 192.168.0.2 and 192.168.0.3's ip. In virtual server eth0 goes to internet, while the clients no. I'd like the clients go to internet too, using the virtual server. There is someone that can help me, please.thank you

Posted: 8. Jan 2009, 23:43
by Sasquatch
You don't specify which OS you run in the VM, so we can't help you with specific instructions. The general idea is to use some kind of Internet Connection Sharing. Windows has this build in, other systems need special routing programs to do that.

Posted: 9. Jan 2009, 20:32
by richardsith
ok sorry, I've forgotten to specify them. I'm using Ubuntu as Virtual Server and as Clients. I've already edited /etc/sysctl.conf and put 1 for the ip forwarding and used the rule

> iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE

but nothing.
To go to internet I pass through my router netgear for the ADSL connection.
thank you

Posted: 10. Jan 2009, 18:27
by richardsith
Hi, I resulted the problem. I don't know what was happened but now it's working well. thank for your help