troubleshooting Question

Linux Iptables Prerouting

Avatar of -Thespian-
-Thespian-Flag for Ukraine asked on
Linux Networking
13 Comments1 Solution6873 ViewsLast Modified:
I have such problem:
- have a server with separete ip (192.168.1.1(internal), 111.111.111.111(external), OS Linux).
- several machines of local network are connected to internet through this machine (OS WinXP).
- on one of the XP machines I have an IIS Server (192.168.1.6).
Problem: if someone opens in his browser - http://111.111.111.111:8080/ - I want to show him the contens of my mashine IIS Server WebSite. And if user enters - http://111.111.111.111/ - the contens of apache Linux server is shown to him.

Now http://111.111.111.111/ - works good. Also I have reached http://111.111.111.111:8080/ to work only from my machine (with IIS and IP=192.168.1.1). From other machines it doesn't work, and from internet too. This thing I have reached by:

iptables -t nat -I PREROUTING -p tcp -d 111.111.111.111 --dport 8080 -s 0.0.0.0/0.0.0.0 -j DNAT --to-destination 192.168.1.6:80


What should I make more?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros