Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 03-27-2006, 10:25 AM   #1
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 147

Rep: Reputation: 17
hostname routing

Is it possible?

I have a linux router doing NAT for one external static IP address. I want to be able to access the machines behind it by hostname. I already have a decent setup where I can access any of the machines. I want to keep the inside machines listening on the same ports, i.e. 4834.

Is it possible for iptables to diffentiate between the hostnames I put in? Is this more of a DNS issue?
Old 03-27-2006, 12:31 PM   #2
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
that's definitely a DNS thing... if your DNS points to the correct IP address(es), the packets will come with the correct destination IP and nat/forwarding rules will send them to the right host.
Note that you can register a domain for free, and organisms like enable your domain name to point to the correct IP when you get a dynamic one (basically, you install a script that will update your IP address in DNS servers).
Also, as far as web servers are concerned, you can set up virtual hosts with apache to redirect to the correct server according to the url.
Hope this helps.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Firewall routing by hostname - possible? jread Linux - Networking 3 09-16-2005 12:34 PM
Hostname/Routing problems with home network robintw SUSE / openSUSE 15 01-08-2005 08:55 AM
Hostname changes Verbal Kint Linux - Networking 6 04-08-2004 04:59 PM
real routing under nat routing nothingmuch Linux - Networking 4 10-27-2003 04:11 PM
hostname command vs. $HOSTNAME env. variable Silly22 Linux - Networking 2 03-29-2002 06:01 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:27 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration