summaryrefslogtreecommitdiff
path: root/templates/firewall/ipv6-name/node.def
blob: e7e1167ed1c197262aab28020dadc94cac029e83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
tag:
priority: 210

type: txt

syntax:expression: pattern $VAR(@) "^[[:graph:]]{1,28}$" ; \
                   "Firewall name must be 28 characters or less"
syntax:expression: pattern $VAR(@) "^[^-]" ; \
                   "Firewall rule set name cannot start with \"-\""
syntax:expression: pattern $VAR(@) "^[^|;&$<>]*$" ; \
                   "Firewall rule set name cannot contain shell punctuation"
syntax:expression: ! pattern $VAR(@) "^VZONE" ; \
                   "Firewall rule set name cannot start with 'VZONE'"

end: if sudo /opt/vyatta/sbin/vyatta-firewall.pl --update-rules "firewall ipv6-name" "$VAR(@)" ;
     then
       if [ ${COMMIT_ACTION} = 'DELETE' ] ; 
       then
          if sudo /opt/vyatta/sbin/vyatta-firewall.pl --teardown-ok "firewall ipv6-name" ;
          then
             sudo /opt/vyatta/sbin/vyatta-firewall.pl --teardown "firewall ipv6-name"
          fi
       fi
     else
       exit 1;
     fi
     ${vyatta_sbindir}/vyatta-firewall-trap.pl --level="firewall ipv6-name $VAR(@)"

create: sudo /opt/vyatta/sbin/vyatta-firewall.pl --setup ip6tables "firewall ipv6-name"

help: IPv6 firewall rule-set name