[openbeos] Help to share network with Qemu on Linux
- From: "Jérôme Duval" <korli@xxxxxxxxxxxxxxxx>
- To: openbeos@xxxxxxxxxxxxx
- Date: Wed, 20 Dec 2006 21:28:30 +0100
Hi,
I had to search for this information and hope it can help some people :
1/ Create a file /etc/qemu-ifup :
#!/bin/sh
sudo modprobe tun
sudo /sbin/ifconfig $1 up 10.0.2.2 netmask 255.255.255.0 broadcast
10.0.2.255
# IP masquerade
sudo echo "1" > /proc/sys/net/ipv4/ip_forward
sudo /sbin/iptables -N nat
sudo /sbin/iptables -t nat -F
sudo /sbin/iptables -t nat -A POSTROUTING -s 10.0.2.15 -j MASQUERADE
sudo /sbin/iptables -t nat -A POSTROUTING -d 10.0.2.15 -o $1
2/ chmod 755 /etc/qemu-ifup
3/ Launch qemu :
qemu -hda generated/haiku.image -serial stdio -usb -soundhw all -net
nic -net user
Bye,
Jérôme
- Follow-Ups:
- [openbeos] Re: Help to share network with Qemu on Linux
- From: Gustavo
- [openbeos] Re: Help to share network with Qemu on Linux
- From: Axel Dörfler
Other related posts:
- » [openbeos] Help to share network with Qemu on Linux
- » [openbeos] Re: Help to share network with Qemu on Linux
- » [openbeos] Re: Help to share network with Qemu on Linux
- » [openbeos] Re: Help to share network with Qemu on Linux
- [openbeos] Re: Help to share network with Qemu on Linux
- From: Gustavo
- [openbeos] Re: Help to share network with Qemu on Linux
- From: Axel Dörfler