Remove bridge setup & use predictable network interace name

This commit is contained in:
sonny 2023-08-06 20:57:24 +02:00
parent ed7bf5a46c
commit 83ad3362bd
6 changed files with 15 additions and 25 deletions

View file

@ -1,6 +0,0 @@
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
[NetDev]
Name={{ bridge_interface }}
Kind=bridge
MACAddress={{ bridge_mac }}

View file

@ -1,7 +1,8 @@
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
[Match]
Name={{ bridge_source_interface }}
MACAddress={{ network_mac }}
[Network]
Bridge={{ bridge_interface }}
[Link]
NamePolicy=
Name={{ network_interface }}

View file

@ -1,7 +1,7 @@
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
[Match]
Name={{ bridge_interface }}
Name={{ network_interface }}
[Network]
DHCP=ipv4

View file

@ -19,12 +19,12 @@ table ip filter {
# allow icmp
ip protocol icmp accept
iifname "br0" tcp dport {{ ssh_port }} accept comment "SSH"
iifname "br0" tcp dport {{ gitlab_ssh_port }} accept comment "Gitlab SSH"
iifname "br0" tcp dport { {{ http_port }}, {{ https_port }} } accept comment "HTTP/HTTPS"
iifname "br0" tcp dport {{ transmission_port }} accept comment "Transmission"
iifname "{{ network_interface }}" tcp dport {{ ssh_port }} accept comment "SSH"
iifname "{{ network_interface }}" tcp dport {{ gitlab_ssh_port }} accept comment "Gitlab SSH"
iifname "{{ network_interface }}" tcp dport { {{ http_port }}, {{ https_port }} } accept comment "HTTP/HTTPS"
iifname "{{ network_interface }}" tcp dport {{ transmission_port }} accept comment "Transmission"
iifname "br0" udp dport {{ vpn_port }} accept comment "Wireguard"
iifname "{{ network_interface }}" udp dport {{ vpn_port }} accept comment "Wireguard"
iifname "{{ vpn_interface }}" tcp dport { {{ http_port }}, {{ https_port }} } ip saddr {{ vpn_source_range }} ip daddr {{ vpn_destination_range }} accept comment "HTTP/HTTPS"
iifname "{{ vpn_interface }}" tcp dport {{ transmission_web_port }} ip saddr {{ vpn_source_range }} ip daddr {{ vpn_destination_range }} accept comment "Transmission Web"