Computing.Net > Forums > Linux > IPTables, ports and DNS

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

IPTables, ports and DNS

Reply to Message Icon

Name: Rich
Date: December 16, 2002 at 12:48:41 Pacific
OS: RH 7.3
CPU/Ram: dual 733/512
Comment:

Hello,

I have a problem with iptables that I can't seem to figure out a way around. Here's my situation:

I have two T1's coming into a Cisco 2620 router and a RedHat 7.3 iptables firewall with three NIC's after that.

eth0 is the ethernet ip of the router (internet IP)
eth1 is my internal
eth2 is my DMZ

The problem is I am going to have two web servers in the DMZ on listening on port 80 and the other listening on port 8080. How can I make the requests for example www.abc.com come in on port 80 and www.123.com come in on port 8080. I know how I can setup my iptable rules to redirect port 80 to on IP in DMZ ip and port 8080 to a different IP in the DMZ. But, how do I get the request to point to a specific port? I'm guessing its in DNS but I don't know how or where to set that. BTW my DNS is WinNT 4.0.

Any help will be greatly appreciated... I in a bind!

Thank You,
Rich



Sponsored Link
Ads by Google

Response Number 1
Name: unixadm2000
Date: December 16, 2002 at 14:12:51 Pacific
Reply:

DNS won't help ya. It is strictly a hostname/IP resolution. You'll have to do what you need through your firewall or web server. It sounds like you already know how to do it.

Another question: Are you having issues with your web server listening on a specific port or are you wondering how to get someone coming in on port 80 redirected to port 8080?


0

Response Number 2
Name: Rich
Date: December 17, 2002 at 05:46:23 Pacific
Reply:

I have one web server listening on 80 (www.abc.com) and one setup to listen on port 8080 (www.123.com).

What I don't know how to do is when someone types www.123.com in their browser how can I get my firewall to forward it to the DMZ web server listening on port 8080. When I do it everything goes to the default port 80 web server.

I can redirect ports in the firewall but the request coming into the firewall is coming in on the standard port 80. If I type the hard IP:8080 it works, but not with relying on DNS.

Thank you!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: IPTables, ports and DNS

IPTables and DNS problem www.computing.net/answers/linux/iptables-and-dns-problem/21825.html

How do I enable iptables port forwa www.computing.net/answers/linux/how-do-i-enable-iptables-port-forwa/18599.html

Iptables Port Forwarding www.computing.net/answers/linux/iptables-port-forwarding/27126.html