Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


iptables port alias

Posted on 2006-06-01
Medium Priority
Last Modified: 2010-07-27
i'd like to have all connections to port 5000 handled by server at port 80

how does one do that ?
(i tried following, but didn't work - i really don't have a clue about iptables :blush
/sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 5000 -j DNAT --to
/sbin/iptables -A FORWARD -i eth0 -p tcp --dport 80 -j ACCEPT
Question by:ed987
1 Comment
LVL 28

Accepted Solution

2266180 earned 2000 total points
ID: 16805746
you don't need the second line. the first one looks correct
1) make sure that there aren't any chains before the DNAT that interfere with this one
2) make sure that eth0 is indeed the interface getting the packats (check that the ip you are connecting is indeed the one from eth0)
3) make sure that the webserver is indeed lic\stening on (either explicitly or it's listening on use netstat -an)

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question