Hello,
this is configuration on my laptop at work:
HOST: Ubuntu 10.10, IP = 10.?.?.? from dhcp
GUEST: Oracle En. Linux 5.5 , host only networking, IP = 192.168.56.101
I can reach guest from host on IP=192.168.56.101, and host from guest on IP =192.168.56.1.
I want to use host to reach Internet from guest (so the host is something like gateway), but I'm not so good in Linux networking, routing and so. Can this be done ? How ?
Please do not suggest other solution (like using NAT, bridged or Internal networking in vbox instead of host only networking , or using another adapter in guest,...) !
Thanks in advance ?
Reach Internet with host only networking
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Reach Internet with host only networking
With your restrictions the only thing I see is for you to learn how to use IP tables.
-
riprop
- Posts: 3
- Joined: 27. Oct 2010, 14:59
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: OEL, Windows XP
Re: Reach Internet with host only networking
Thanks for trail.
Is Iptables enough, what about routing table ?
I didn't mention (in order to keep question clear/simple/short), but I have two more guests (with IPs 192.168.56.102 and 192.168.56.103), and all they can be reached mutually now, I just want to add Internet to them trough HOST.
Is Iptables enough, what about routing table ?
I didn't mention (in order to keep question clear/simple/short), but I have two more guests (with IPs 192.168.56.102 and 192.168.56.103), and all they can be reached mutually now, I just want to add Internet to them trough HOST.
-
stefan.becker
- Volunteer
- Posts: 7639
- Joined: 7. Jun 2007, 21:53
Re: Reach Internet with host only networking
One approach is to use a proxy server on the host.
German Howto (Linux): http://www.linuxforen.de/forums/showthread.php?t=236444
User Manual / Download Section: http://www.virtualbox.de/wiki/Downloads
FAQ: http://www.virtualbox.de/wiki/User_FAQ http://forums.virtualbox.org/viewtopic.php?t=8669
User Manual / Download Section: http://www.virtualbox.de/wiki/Downloads
FAQ: http://www.virtualbox.de/wiki/User_FAQ http://forums.virtualbox.org/viewtopic.php?t=8669
-
Perryg
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: Reach Internet with host only networking
Google using iptables to route packets It explains it better then I can here. It can do what you want.
Edit: Or as Stefan says use squid, but this approach is limited and sometime restrictive depending on how you set it up.
Edit: Or as Stefan says use squid, but this approach is limited and sometime restrictive depending on how you set it up.