Permabanned
- Joined
- 13 Nov 2006
- Posts
- 5,798
I cannot seem to find anywhere that describes how to do a simple port redirect on a linux box using iptables.
I don't want it going to another ip address, I just want the port to be locally redirected. I ended up with this which im not sure about...
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 5000 -j REDIRECT --to-port 8000
Would this mean anything incoming on 5000 gets redirected to 8000 on the local machine? Is there anyway to check if this is working correct.
Please help. Thanks.
I don't want it going to another ip address, I just want the port to be locally redirected. I ended up with this which im not sure about...
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 5000 -j REDIRECT --to-port 8000
Would this mean anything incoming on 5000 gets redirected to 8000 on the local machine? Is there anyway to check if this is working correct.
Please help. Thanks.
Last edited: