return_('This section defines common properties of %q. The <em>input</em> and <em>output</em> options set the default policies for traffic entering and leaving this zone while the <em>forward</em> option describes the policy for forwarded traffic between different networks within the zone. <em>Covered networks</em> specifies which available networks are members of this zone.')
return_('The options below control the forwarding policies between this zone (%s) and other zones. <em>Destination zones</em> cover forwarded traffic <strong>originating from %q</strong>. <em>Source zones</em> match forwarded traffic from other zones <strong>targeted at %q</strong>. The forwarding rule is <em>unidirectional</em>, e.g. a forward from lan to wan does <em>not</em> imply a permission to forward from wan to lan as well.')
.format(name);
};
o=s.taboption('advanced',widgets.DeviceSelect,'device',_('Covered devices'),_('Use this option to classify zone traffic by raw, non-<em>uci</em> managed network devices.'));
o.modalonly=true;
o.noaliases=true;
o.multiple=true;
o=s.taboption('advanced',form.DynamicList,'subnet',_('Covered subnets'),_('Use this option to classify zone traffic by source or destination subnet instead of networks or devices.'));
o.datatype='neg(cidr)';
o.modalonly=true;
o.multiple=true;
o=s.taboption('advanced',form.ListValue,'family',_('Restrict to address family'));
o.value('',_('IPv4 and IPv6'));
o.value('ipv4',_('IPv4 only'));
o.value('ipv6',_('IPv6 only'));
o.modalonly=true;
o=s.taboption('advanced',form.DynamicList,'masq_src',_('Restrict Masquerading to given source subnets'));
o=s.taboption('conntrack',form.Flag,'masq_allow_invalid',_('Allow "invalid" traffic'),_('Do not install extra rules to reject forwarded traffic with conntrack state <em>invalid</em>. This may be required for complex asymmetric route setups.'));
o.modalonly=true;
o=s.taboption('conntrack',form.Flag,'auto_helper',_('Automatic helper assignment'),_('Automatically assign conntrack helpers based on traffic protocol and port'));
o.default=o.enabled;
o.modalonly=true;
o=s.taboption('conntrack',form.MultiValue,'helper',_('Conntrack helpers'),_('Explicitly choses allowed connection tracking helpers for zone traffic'));
return_('Passing raw iptables arguments to source and destination traffic classification rules allows to match packets based on other criteria than interfaces or subnets. These options should be used with extreme care as invalid values could render the firewall ruleset broken, completely exposing all services.');
};
o=s.taboption('extra',form.Value,'extra_src',_('Extra source arguments'),_('Additional raw <em>iptables</em> arguments to classify zone source traffic, e.g. <code>-p tcp --sport 443</code> to only match inbound HTTPS traffic.'));
o=s.taboption('extra',form.Value,'extra_dest',_('Extra destination arguments'),_('Additional raw <em>iptables</em> arguments to classify zone destination traffic, e.g. <code>-p tcp --dport 443</code> to only match outbound HTTPS traffic.'));
return_('The options below control the forwarding policies between this zone (%s) and other zones. <em>Destination zones</em> cover forwarded traffic <strong>originating from %q</strong>. <em>Source zones</em> match forwarded traffic from other zones <strong>targeted at %q</strong>. The forwarding rule is <em>unidirectional</em>, e.g. a forward from lan to wan does <em>not</em> imply a permission to forward from wan to lan as well.')
.format(name);
};
out=o=s.taboption('general',widgets.ZoneSelect,'out',_('Allow forward to <em>destination zones</em>:'));