#!/bin/sh echo "/etc/qemu-ifup invoked to configure $1 interface" # Default debian config #sudo -p "Password for $0:" /sbin/ifconfig $1 172.20.0.1 # Bridge tap interface to an ethernet interface. # WARNING: if the host is a diskless setup (knoppix terminal server), # bringing down the interface will hang the pc ... sudo -p "Password for $0:" /usr/local/bin/qemu_bridge $1 # Forward traffic (using iptables) # dhcp won't work, so in the guest os you'll have to do: # ifconfig eth0 10.0.20.2 # route add default gw 10.0.20.1 # (also populate /etc/resolv.conf etc) #sudo -p "Password for $0:" /usr/local/bin/qemu_forward 10.0.20.1 10.0.20.255 255.255.255.0 $1