I've been looking for help about mounting internet on my virtual windows machine that runs under qemu.
I caught this under linuxquestions:
Quote:
Now that Windows is installed, you need to get internet working. It autoconfigures its NIC with a virtual dhcp server with the IP of 10.0.2.5. You need to allow packet flow of that DHCP server, so I put these rules in my iptables config:
Code:
iptables -A FORWARD -d $IP_FROM_CLIENT_OS -j ACCEPT
iptables -A FORWARD -s $IP_FROM_CLIENT_OS -j ACCEPT
$IP_FROM_CLIENT_OS was set to the virtual dhcp server's ip: 10.0.2.5
You'll need to make sure you have the tun/tap kernel module installed. It was, in my kernel, installed as a module by default. So all I had to do was:
You now have a /dev/net/tun device, and should have internet.
After that, I reloaded the image.
|
How do I edit that iptables? I know it is in /sbin/ifconfig, am I right?
Yeah, but when I open it with gedit text editor, I get a message saying that he's uncapable of reading the text codification. How can I edit it?