update firewall rules to allow upnp requests
This commit is contained in:
parent
cda6fff78b
commit
1d2cb130cf
1 changed files with 13 additions and 3 deletions
|
@ -40,9 +40,19 @@ in {
|
|||
default = true;
|
||||
};
|
||||
config = {
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
wireguardPort
|
||||
];
|
||||
networking.firewall = {
|
||||
allowedUDPPorts = [
|
||||
wireguardPort
|
||||
];
|
||||
extraCommands = ''
|
||||
# Allow UDP packets comming from port 1900 from a local address,
|
||||
# these are necessary for UPnP/IGD
|
||||
iptables -A INPUT -s 192.168.0.0/16 -p udp --sport 1900 -j ACCEPT
|
||||
'';
|
||||
extraStopCommands = ''
|
||||
iptables -D INPUT -s 192.168.0.0/16 -p udp --sport 1900 -j ACCEPT
|
||||
'';
|
||||
};
|
||||
|
||||
networking.wireguard.interfaces.wg0 = {
|
||||
ips =
|
||||
|
|
Loading…
Reference in a new issue