Revision dc1aa5d9 ifup-extra

b/ifup-extra
6 6
# Useful environment vars
7 7
# INTERFACE, INSTANCE, IP, NETWORK_TAGS, MODE, TABLE
8 8

  
9
function reset_extra (){
10

  
11
  iptables -D FORWARD -i $INTERFACE -p tcp --dport 25 -j ACCEPT
12
  ip6tables -D FORWARD -i $INTERFACE -p tcp --dport 25 -j ACCEPT
13

  
14
}
15

  
16
# Reset rules that might have been applied by a previous ifup-extra
17
try reset_extra
18

  
9 19
ifprefixindex="synnefo:network:$INTERFACE_INDEX:"
10 20
ifprefixname="synnefo:network:$INTERFACE_NAME:"
11 21
ifprefixuuid="synnefo:network:$INTERFACE_UUID:"
......
16 26
  case $tag in
17 27
    mail)
18 28
    # Here add iptalbes rule..
29
    iptables -I FORWARD -i $INTERFACE -p tcp --dport 25 -j ACCEPT
30
    ip6tables -I FORWARD -i $INTERFACE -p tcp --dport 25 -j ACCEPT
19 31
  ;;
20 32
  esac
21 33
done

Also available in: Unified diff