firewall: ensure wireguard egress traffic uses the anycast source IP
Before we relied on the IP being first in the interfaces file, which is less than optimal. Now we use nftables to ensure the correct source IP is set only for the (fwmarked) wireguard traffic. Also remove iface hints from interfaces configuration as they are not needed with ifupdown-ng.
This commit is contained in:
parent
9b03b002f7
commit
6840838978
3 changed files with 20 additions and 5 deletions
|
@ -1,10 +1,9 @@
|
|||
{% set addrs = interfaces | selectattr('name', '==', 'lo') | map(attribute='ip_addresses') | first -%}
|
||||
|
||||
source-directory /etc/network/interfaces.d
|
||||
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
address {{ wg_ip }}
|
||||
iface lo
|
||||
{% for address in addrs %}
|
||||
address {{ address.address }}
|
||||
{% endfor %}
|
||||
|
||||
source-directory /etc/network/interfaces.d
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue