Configure network bridge

#!/bin/bash

# backup original network config
mv /etc/network/interfaces /etc/network/interfaces.org

# configure network bridge for xen
cat < /etc/network/interfaces
auto lo
iface lo inet loopback

# eth0 (internal lan)
auto eth0 eth1 xenbr1
iface eth0 inet static
address 192.168.1.111
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.5
#post-up ethtool -K eth0 tx off

# eth1 (DSL)
iface eth1 inet manual
up ifconfig eth1 0.0.0.0 promisc up

# xenbr1 (bridge between second nic and virtual firewall)
iface xenbr1 inet manual
up ifconfig xenbr1 0.0.0.0 up
bridge_ports eth1
bridge_fd 1
bridge_stp off
bridge_hello 1
down ifconfig xenbr1 down
EOF