💾 Archived View for tozip.chickenkiller.com › iptables.gmi captured on 2023-04-19 at 22:33:06. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-07-16)

-=-=-=-=-=-=-

iptables

Created 2022-06-12

Redirect port 300 to port 3000.:

sudo iptables -t nat -I PREROUTING --src 0/0 --dst 127.0.0.1 -p tcp --dport 300 -j REDIRECT --to-ports 3000
sudo iptables -t nat -I OUTPUT --src 0/0 --dst 127.0.0.1 -p tcp --dport 300 -j REDIRECT --to-ports 3000

It might have some snags, though.

The above won't survive reboot.