summaryrefslogtreecommitdiff
path: root/templates-cfg/zone-policy/zone/node.def
blob: 4845c2f7a9c104d4f390a8e9e264bfac4295f0de (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
32
33
34
35
36
37
38
39
40
tag:
type: txt
help: Zone name

syntax:expression: pattern $VAR(@) "^[[:print:]]{1,18}$" ;
                "Zone name must be 18 characters or less"

syntax:expression: pattern $VAR(@) "^[^-]" ; "Zone name cannot start with \"-\""

syntax:expression: pattern $VAR(@) "^[^;]*$" ; "Zone name cannot contain ';'"

create: 
	# fw zone actions
	if ! /opt/vyatta/sbin/vyatta-zone.pl		\
	  --action=add-zone				\
	  --zone-name="$VAR(@)"; then
	  exit 1
	fi

	# ips zone actions
	if ! /opt/vyatta/sbin/vyatta-zone-ips.pl	\
	  --action=add-zone				\
	  --zone-name="$VAR(@)"; then
	  exit 1
	fi

delete: 
	# fw zone actions
	if ! /opt/vyatta/sbin/vyatta-zone.pl		\
	  --action=delete-zone				\
	  --zone-name="$VAR(@)"; then
	  exit 1
	fi

	# ips zone actions
	if ! /opt/vyatta/sbin/vyatta-zone-ips.pl	\
	  --action=delete-zone				\
	  --zone-name="$VAR(@)"; then
	  exit 1
	fi