![]() |
|
|
#1 | |
|
Join Date: Mar 2011
Posts: 1 (0.00/day)
Thanks: 0
Thanked 0 Times in 0 Posts
|
Can you allow the host to use the VM network connection?
Quote:
this is possible although not immediately obviously useful. My situation was one where the vm os was able to change settings on a wireless network adapter which allowed me to pick up the signal at a useable strength. The host could not do this. So I was in the weird situation where the vm os - backtrack - had internet but the host - osx 10.6 - did not. Annoying. Easily corrected as follows: 1. connect the vm to the network, in my case this was wireless so wlan0 2. set up the vm so that is has a local network with the host, make sure the host can ping the vm. In my case this meant enabling eth0 in the vm 3. set up ip forward and iptables masquerade rules on the vm. 4. change the default route of the host to be the vm local ip 5. enjoy the vm network via the host now I imagine some readers will want more detail on ip forward and masquerade with iptables but there are a lot of tutorials out there for this stuff. It depends on the vm os but if you are using linux then ip forward with: $ echo 1 > /proc/sys/net/ipv4/ip_forward iptables rules something like this iptables -t nat -A POSTROUTING -s $PRIVATE -o eth0 -j MASQUERADE {clearly $PRIVATE is your private subnet, set the rules up to run at ifup}
Last edited by MatteusBlanc; Mar 23, 2011 at 06:37 PM. Reason: ip forward and ip tables are settings in the vm, not the host. Line under bullet 5. changed. |
|
|
|
|
|
|
#2 |
|
Linux Advocate
Join Date: Nov 2006
Posts: 10,226 (4.29/day)
Thanks: 1,208
Thanked 2,775 Times in 1,793 Posts
|
that is pretty damn clever.
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can I share a network connection from a VM to the host OS? | beyond_amusia | Networking & Security | 1 | Jun 25, 2009 02:20 AM |
| Can you guys change the order of links on the navigation bar? | Studabaker | Comments & Feedback | 3 | Jun 16, 2009 10:23 PM |
| Should I use DVI for my PC-monitor connection? And use the VGA port for my Xbox360? | KKSlider1337 | General Hardware | 7 | Jan 6, 2009 09:18 AM |
| What type of network connection do you use? | panchoman | Networking & Security | 44 | Dec 16, 2007 09:34 AM |
| Can you use the DVI out on the video card to pulg into an HDTV? | JC316 | General Hardware | 17 | Feb 7, 2007 10:29 PM |