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 DEFAULT=/etc/default/snf-network
7 NFDHCPD_STATE_DIR=/var/lib/nfdhcpd
10 function clear_routed_setup_ipv4 {
12 arptables -D OUTPUT -o $INTERFACE --opcode request -j mangle
13 while ip rule del dev $INTERFACE; do :; done
14 iptables -D FORWARD -i $INTERFACE -p udp --dport 67 -j DROP
18 function clear_routed_setup_ipv6 {
20 while ip -6 rule del dev $INTERFACE; do :; done
25 function clear_routed_setup_firewall {
27 for oldchain in protected unprotected limited; do
28 iptables -D FORWARD -o $INTERFACE -j $oldchain
29 ip6tables -D FORWARD -o $INTERFACE -j $oldchain
34 function clear_ebtables {
39 ebtables -D INPUT -i $TAP -j $FROM
40 ebtables -D FORWARD -i $TAP -j $FROM
41 ebtables -D FORWARD -o $TAP -j $TO
42 ebtables -D OUTPUT -o $TAP -j $TO
50 echo "Usage: $0 <tap>"
56 clear_routed_setup_ipv4
57 clear_routed_setup_ipv6
58 clear_routed_setup_firewall
61 rm $NFDHCPD_STATE_DIR/$INTERFACE