man: wg-quick: kill-switch rules for firewalld
PATCH 1/1 man: wg-quick: kill-switch rules for firewalld
Signed-off-by Sotir Danailov <[email protected]>
--- src/man/wg-quick.8 | 7 +++++++ 1 file changed, 7 insertions(+)
src/man/wg-quick.8 +7 -0
@@ -156,6 +156,13 @@ two lines `PostUp` and `PreDown` lines to the `[Interface]` section: \fBPreDown = iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT\fP .br +When using `firewalld', the ``kill-switch'' can be done like so: + + \fBPostUp = firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 0 ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT && firewall-cmd --reload\fP +.br + \fBPreDown = firewall-cmd --permanent --direct --remove-rule ipv4 filter OUTPUT 0 ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT && firewall-cmd --reload\fP +.br + The `PostUp' and `PreDown' fields have been added to specify an .BR iptables (8) command which, when used with interfaces that have a peer that specifies 0.0.0.0/0 as part of the
Signature · 1 line
2.37.1