1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-12-04 18:56:56 +01:00

thegeneralist(plex): use DNAT to 100.108.125.63:32499 instead of REDIRECT

This commit is contained in:
TheGeneralist 2026-11-30 23:55:50 +01:00
parent 2fdead20b0
commit 78393fd2be
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4

View file

@ -98,10 +98,11 @@ in
networking.firewall.extraCommands = ''
iptables -A nixos-fw -s 192.168.2.0/24 -p tcp --dport 32400 -j nixos-fw-accept
iptables -t nat -D PREROUTING -i tailscale0 -p tcp --dport 32400 -j REDIRECT --to-ports 32499 2>/dev/null || true
iptables -t nat -A PREROUTING -i tailscale0 -p tcp --dport 32400 -j REDIRECT --to-ports 32499
iptables -t nat -D PREROUTING -i tailscale0 -p tcp --dport 32400 -j DNAT --to-destination 100.108.125.63:32499 2>/dev/null || true
iptables -t nat -A PREROUTING -i tailscale0 -p tcp --dport 32400 -j DNAT --to-destination 100.108.125.63:32499
'';
networking.firewall.extraStopCommands = ''
iptables -t nat -D PREROUTING -i tailscale0 -p tcp --dport 32400 -j REDIRECT --to-ports 32499 2>/dev/null || true
iptables -t nat -D PREROUTING -i tailscale0 -p tcp --dport 32400 -j DNAT --to-destination 100.108.125.63:32499 2>/dev/null || true
'';
systemd.sockets.plex-tailscale-proxy = {