diff options
| author | Kjetil Orbekk <kj@orbekk.com> | 2025-12-15 18:10:36 -0500 |
|---|---|---|
| committer | Kjetil Orbekk <kj@orbekk.com> | 2025-12-15 18:10:48 -0500 |
| commit | 584081eac4d63c9ac9776e213510ea78dc209983 (patch) | |
| tree | 872b5e5540a7060bcd6ea1c4611723f4fed410f9 | |
| parent | a0af9b8843e3ca8920bec0bb050ce52450aef15c (diff) | |
Add upnp config
| -rw-r--r-- | modules/router.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/router.nix b/modules/router.nix index f920e8a..3c69445 100644 --- a/modules/router.nix +++ b/modules/router.nix @@ -82,6 +82,14 @@ let services.avahi.publish.hinfo = true; services.avahi.publish.userServices = true; + services.miniupnpd.enable = true; + services.miniupnpd.externalInterface = ""; + services.miniupnpd.internalIPs = [ + "lan-vport" + "dragon-vport" + "servers-vport" + ]; + networking.interfaces.eno1 = {}; networking.interfaces.eno2 = {}; networking.interfaces.wan-vport = { @@ -337,6 +345,16 @@ let meta nfproto ipv6 oifname {"mullvad"} counter masquerade } } + + table inet miniupnpd { + chain miniupnpd {} + chain prerouting_miniupnpd { + type nat hook prerouting priority dstnat; policy accept; + } + chain postrouting_miniupnpd { + type nat hook postrouting priority srcnat; policy accept; + } + } ''; }; in { |
