Port forwarding
IP tables port forwarding can be used to direct requests from one port to another. It is extremely helpful in situation where you need to run your application as non-root but still need to serve the app on port 80. This will also eliminate the need for root/sudo privileges.
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8000
To save the changes permanently, execute the save command.
service iptables save
To look at the saved configuration,
more /etc/sysconfig/iptables
You can also execute the stop and start conmands as required.
service iptables stop
service iptables start
1 Comments:
Hi there everyone, it’s my first pay a quick visit at this website,
and article is in fact fruitful in favor of me,
keep up posting such posts.
Bubble
www.gofastek.com
Post a Comment
Subscribe to Post Comments [Atom]
<< Home