package firewall

config package
	option title 'Firewall configuration'

config section
	option name	'zone'
	option title	'Firewall zones'
	option package	'firewall'

config variable
	option name	'network'
	option title	'Networks belonging to this zone'
	option section	'firewall.zone'
	option valueof	'network.interface'
	option multival	true

config variable
	option name	'forward'
	option title	'Zone specific action for forwarded traffic'
	option section	'firewall.zone'
	option required	true

config variable
	option name	'input'
	option title	'Zone specific action for incoming traffic'
	option section	'firewall.zone'
	option required	true

config variable
	option name	'output'
	option title	'Zone specific action for outgoing traffic'
	option section	'firewall.zone'
	option required	true

config section
	option name	'defaults'
	option title	'Global firewall defaults'
	option package	'firewall'
	option unique	true
	option required	true

config variable
	option name	'forward'
	option title	'Action for forwarded traffic'
	option section	'firewall.defaults'
	option required	true

config variable
	option name	'input'
	option title	'Action for incoming traffic'
	option section	'firewall.defaults'
	option required	true

config variable
	option name	'output'
	option title	'Action for outgoing traffic'
	option section	'firewall.defaults'
	option required	true

config variable
	option name	'syn_flood'
	option title	'Enable syn-flood protection'
	option section	'firewall.defaults'
	option datatype	'boolean'

config section
	option name	'forwarding'
	option title	'Forwarding rules'
	option package	'firewall'

config variable
	option name	'src'
	option title	'Source zone'
	option section	'firewall.forwarding'
	option valueof	'firewall.zone.name'

config variable
	option name	'dest'
	option title	'Destination zone'
	option section	'firewall.forwarding'
	option valueof	'firewall.zone.name'
	option required	true

config section
	option name	'rule'
	option title	'Custom rules'
	option package	'firewall'
	
config variable
	option name	'src'
	option title	'Source zone'
	option section	'firewall.rule'
	option valueof	'firewall.zone'

config variable
	option name	'dest'
	option title	'Destination zone'
	option section	'firewall.rule'
	option valueof	'firewall.zone'

config variable
	option name	'src_ip'
	option title	'Source IP address'
	option section	'firewall.rule'
	option datatype 'address'

config variable
	option name	'src_port'
	option title	'Source port'
	option section	'firewall.rule'
	option datatype	'portrange'

config variable
	option name	'src_mac'
	option title	'Source MAC address'
	option section	'firewall.rule'
	option datatype	'macaddr'

config variable
	option name	'dest_ip'
	option title	'Destination IP address'
	option section	'firewall.rule'
	option datatype 'address'

config variable
	option name	'dest_port'
	option title	'Destination port'
	option section	'firewall.rule'
	option datatype	'multiport'

config variable
	option name	'proto'
	option title	'Protocol'
	option section	'firewall.rule'
	option datatype	'string'

config variable
	option name	'target'
	option title	'Option target'
	option section	'firewall.rule'
	option required	true

config variable
	option name	'qos_id0'
	option title	'QosID'
	option section	'firewall.rule'
	option datatype	'string'
	list   depends	'target=ACCEPT'

config variable
	option name	'qos_id1'
	option title	'QosID'
	option section	'firewall.rule'
	option datatype	'string'
	list   depends	'target=ACCEPT'

config variable
	option name	'ttl'
	option title	'TTL'
	option section	'firewall.rule'
	option datatype	'uint'

config variable
	option name	'mirror'
	option title	'Mirror'
	option section	'firewall.rule'
	list   depends	'target'

config variable
	option name	'original'
	option title	'Original'
	option section	'firewall.rule'
	list   depends	'mirror'

config variable
	option name	'reply'
	option title	'Reply'
	option section	'firewall.rule'
	list   depends	'mirror'

