WireGuard: Difference between revisions
→DNS for the proxy client: knot dns server |
→Route all traffic over wg0, except endpoint: fix firewallmark position |
||
Line 257: | Line 257: | ||
systemd.network = { | systemd.network = { | ||
netdevs."50-wg0" = { | netdevs."50-wg0" = { | ||
# FirewallMark simply marks all packets send and received by this wireguard | |||
# interface with the number 42, which can be used to define policy rules on these packets. | |||
wireguardConfig.FirewallMark = 42; | |||
wireguardPeers = [ | wireguardPeers = [ | ||
{ | { | ||
Line 271: | Line 275: | ||
# for the wireguard interface, and no rules are set on the main routing table. | # for the wireguard interface, and no rules are set on the main routing table. | ||
RouteTable = 1000; | RouteTable = 1000; | ||
} | } | ||
]; | ]; |