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;
|
default = true;
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
networking.firewall.allowedUDPPorts = [
|
networking.firewall = {
|
||||||
wireguardPort
|
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 = {
|
networking.wireguard.interfaces.wg0 = {
|
||||||
ips =
|
ips =
|
||||||
|
|
Loading…
Reference in a new issue