summaryrefslogtreecommitdiff
path: root/templates/firewall/ipv6-group/address-group/node.def
diff options
context:
space:
mode:
authorMarian Tudosoiu <marian.tudosoiu@1and1.ro>2018-03-12 12:34:35 +0200
committerMarian Tudosoiu <marian.tudosoiu@1and1.ro>2018-03-12 12:34:35 +0200
commit03f1937e7dcb01ce810c9c19eda15149245f4537 (patch)
tree2afe38d0afb048f0c16b2746b81f8e8660c3bd07 /templates/firewall/ipv6-group/address-group/node.def
parentd1164b989295016436f20caa709603ec5d85a4d3 (diff)
downloadvyatta-cfg-firewall-03f1937e7dcb01ce810c9c19eda15149245f4537.tar.gz
vyatta-cfg-firewall-03f1937e7dcb01ce810c9c19eda15149245f4537.zip
Task T35 - add support for IPv6 firewall adddress and network groups
Diffstat (limited to 'templates/firewall/ipv6-group/address-group/node.def')
-rw-r--r--templates/firewall/ipv6-group/address-group/node.def25
1 files changed, 25 insertions, 0 deletions
diff --git a/templates/firewall/ipv6-group/address-group/node.def b/templates/firewall/ipv6-group/address-group/node.def
new file mode 100644
index 0000000..b61f784
--- /dev/null
+++ b/templates/firewall/ipv6-group/address-group/node.def
@@ -0,0 +1,25 @@
+tag:
+priority: 200
+type: txt
+help: Firewall address-group
+
+syntax:expression: pattern $VAR(@) "^[[:graph:]]{1,31}$" ; \
+ "Firewall group name must be 31 characters or less"
+
+syntax:expression: pattern $VAR(@) "^[^-]" ; \
+ "Firewall group name cannot start with \"-\""
+
+syntax:expression: pattern $VAR(@) "^[^!]" ; \
+ "Firewall group name cannot start with \"!\""
+
+syntax:expression: pattern $VAR(@) "^[^|;&$<>]*$" ; \
+ "Firewall group name cannot contain shell punctuation"
+
+syntax:expression: exec "/opt/vyatta/sbin/vyatta-ipset.pl --action=is-group-defined --set-name=$VAR(@) \
+ --set-type=address --set-family=inet6"; \
+ "Firewall group name already used as Ipv4 group address"
+
+end: if sudo /opt/vyatta/sbin/vyatta-ipset.pl --action=update-set \
+ --set-name="$VAR(@)" --set-type=address --set-family=inet6; then
+ ${vyatta_sbindir}/vyatta-firewall-trap.pl --level="firewall group address-group $VAR(@)"
+ fi