-   Linux - Networking (
-   -   Reverse IP forwarding Help!! :) (

carrellc 03-09-2004 05:21 PM

Reverse IP forwarding Help!! :)
Help:) !! - Reverse IP forwarding ( post #1)

I've been searching everywhere for my answer and am needing help!

I'll give a quick overview of how our RH9 Linux server is setup and what i need help with:

We have a Mail/DNS/Internet server with 2 Nics in it eth0 and eth1. I've aliased eth1 with another address 199.x.x.26 and have made made the change in rc.firewall to forward all port 80 stuff from 199.x.x.26 to a computer on our lan

My problem is what do i do to make another local computer[say computer] that hits the address 199.x.x.26 redirect to, they can hit it by typing as the url address but i want it to hit 199.x.x.26 for everyone nomatter where they are at home or at work.

I am guessing i have to modify DNS or use the route or NAT commands but i really need help on this one, first time i've ever had to do this and i've looked at tons of online docs/howtos but cannot find the same problem on the net, probly cause i am using the wrong keywords in refining my search

Appreciate all help i can get!!

maxut 03-10-2004 03:28 AM

i think u can do that with iptables.. redirect to if the sorce ip is from your local network (, and destination ip is and protocol is tcp and destination port is 80

all of them in a one line:
iptables -t nat -A PREROUTING -s -p tcp --dport 80 -d -j REDIRECT --to

i hope it works.. if it works let me know please

maxut 03-11-2004 02:16 AM

im so sorry .. REDIRECT wont work.. u should use DNAT not REDIRECT..

maxut 03-11-2004 02:26 AM

actually u must create another network segment for your server or servers (DMZ)..
and your clients must not be in same network with servers.. linux must be placed between local network, DMZ and internet.. if u do that u can configure everything easyly with iptables.

All times are GMT -5. The time now is 08:58 AM.