3 # This is an example of a Ganeti kvm ifup script that configures network
4 # interfaces based on the initial deployment of the Okeanos project
6 source /etc/default/snf-network
7 source /usr/lib/snf-network/common.sh
9 FROM=FROM${INTERFACE^^}
12 try clear_routed_setup_ipv4
13 try clear_routed_setup_ipv6
14 try clear_routed_setup_firewall
18 if [ "$MODE" = "routed" ]; then
20 ip link set $INTERFACE addr $TAP_CONSTANT_MAC up
22 DROPDHCPREQCMD="iptables -A FORWARD -i $INTERFACE -p udp --dport 67 -j DROP"
23 elif [ "$MODE" = "bridged" ]; then
24 ip link set $INTERFACE up
25 brctl addif $BRIDGE $INTERFACE
28 DROPDHCPREQCMD="ebtables -A $FROM -p ipv4 --ip-protocol udp --ip-destination-port 67 -j DROP"
32 for tag in $NETWORK_TAGS; do
37 try routed_setup_firewall
40 # Drop unicast BOOTP/DHCP packets