#!/bin/bash # backup original network config mv /etc/network/interfaces /etc/network/interfaces.org # configure network bridge for xen cat <<EOF> /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
Do you like this page? Then support it. Please click the AD below and visit the sponsor. Thank you!