summaryrefslogtreecommitdiff
path: root/templates/firewall/group/network-group/node.def
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@io.vyatta.com>2009-02-02 19:50:21 -0800
committerStig Thormodsrud <stig@io.vyatta.com>2009-02-02 19:50:21 -0800
commit299adf5bb38fa7e026ccd3604fc05ba812520700 (patch)
tree1df602c721dafae568a14b79d4af9b58e6c0e4b3 /templates/firewall/group/network-group/node.def
parent3ea4540b14ad999386c4b359a963bf362d545ee2 (diff)
downloadvyatta-cfg-firewall-299adf5bb38fa7e026ccd3604fc05ba812520700.tar.gz
vyatta-cfg-firewall-299adf5bb38fa7e026ccd3604fc05ba812520700.zip
Add 1st pass of firewall group support (ipset netfilter module
integration).
Diffstat (limited to 'templates/firewall/group/network-group/node.def')
-rw-r--r--templates/firewall/group/network-group/node.def24
1 files changed, 24 insertions, 0 deletions
diff --git a/templates/firewall/group/network-group/node.def b/templates/firewall/group/network-group/node.def
new file mode 100644
index 0000000..2d8bf60
--- /dev/null
+++ b/templates/firewall/group/network-group/node.def
@@ -0,0 +1,24 @@
+tag:
+type: txt
+help: Set a firewall network-group
+
+syntax:expression: exec " \
+ if [ `echo $VAR(@) | wc -c` -gt 31 ]; then \
+ echo group name must be 31 characters or less;\
+ exit 1 ; \
+ fi ; "
+
+syntax:expression: pattern $VAR(@) "^[^-]" ; \
+ "Firewall group name cannot start with \"-\""
+
+create: sudo /opt/vyatta/sbin/vyatta-ipset.pl \
+ --action=create-set \
+ --set-type=network \
+ --set-name="$VAR(@)"
+
+
+delete: sudo /opt/vyatta/sbin/vyatta-ipset.pl \
+ --action=delete-set \
+ --set-name="$VAR(@)"
+
+comp_help: Enter the name of the firewall network-group