{{define "content"}} {{with .Data}} {{$e := .Errors}}

Every LAN and tunnel belongs to a zone. Traffic inside a zone is allowed; between zones it is denied unless a rule allows it. A rule works in one direction (replies are always allowed), so letting two zones talk to each other takes two rules.

Zones {{range $i, $m := .Members}} {{with index $e (printf "member[%d]" $i)}}{{end}} {{end}}
InterfaceDeviceZone
{{if eq $m.Kind "lan"}}LAN{{else}}Tunnel{{end}} {{$m.Name}} {{$m.Device}}
{{.}}

Several interfaces can share a zone. The uplink is the zone wan; rules from it publish services.

{{range .Empty}}

Zone {{.}} has no interface. {{with index $e (printf "zone.%s" .)}}{{.}}{{end}}

{{end}} {{with index $e "newzone"}}{{.}}{{end}}

A new zone can be picked above (and in the rules) after saving.

Rules
{{range $i, $r := .Rows}} {{range $f := list "from" "sources" "sourcePorts" "to" "destination" "ports" "protocol"}}{{with index $e (printf "rule[%d].%s" $i $f)}}{{end}}{{end}} {{end}}
From zoneFrom addressFrom portTo zoneTo addressTo portProtocolRemove
{{if or $r.From $r.To}}{{end}}
{{$f}}: {{.}}

Fill in the last row to add a rule. Addresses (several separated by commas) are IPv4 or IPv6, single or CIDR; to address is one address or network. Ports (tcp and udp only): 22, 443, 5000-5100.

From the internet
{{range $i, $r := .Forwards}} {{range $f := list "protocol" "ports" "to" "destination" "toport" "sources" "hairpin" "ratelimit"}}{{with index $e (printf "fwd[%d].%s" $i $f)}}{{end}}{{end}} {{end}}
ProtocolPublic portTo zoneTo addressTo portOnly fromPort forwardHairpinLogRate limitRemove
{{if or $r.Ports $r.Destination}}{{end}}
{{$f}}: {{.}}

Everything from the internet is blocked unless listed here. A port forward sends tcp or udp traffic for the router's public IPv4 address to one host inside (to address is that host; to port only if it differs, with a single public port); the sender's address is kept. Without it the rule just lets traffic through to an address or network inside, for IPv6 or for a public range. Hairpin lets your LANs use the forward through the router's public address. Rate limit caps new connections per sender, like 10/minute. Fill in the last row to add one.

{{if .Other}}

Other rules

Rules with options this page does not edit are kept as they are; change them in settings.json.

{{end}} {{end}} {{end}}