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:
parent
2fdead20b0
commit
78393fd2be
1 changed files with 3 additions and 2 deletions
|
|
@ -98,10 +98,11 @@ in
|
||||||
networking.firewall.extraCommands = ''
|
networking.firewall.extraCommands = ''
|
||||||
iptables -A nixos-fw -s 192.168.2.0/24 -p tcp --dport 32400 -j nixos-fw-accept
|
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 -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 = ''
|
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 = {
|
systemd.sockets.plex-tailscale-proxy = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue