Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-10-2010, 04:45 PM   #1
Registered: Jul 2007
Location: Knaphill, Surrey
Distribution: Linux Mint
Posts: 277

Rep: Reputation: 36
dual domain names on a single network

Hello all,

Tried to find an answer for this on here but cant quite get it, so I hope someone can give me some pointers.

Anyway... Here is my scenario and what I want to try and achieve.

I have:

Server A = (
Server B = (
Currently I have domain name set up using a free dns service online. When I am anywhere in the world I just type the domain name it hits my static ISP IP via the free dns servers online, hits my home router, gets port forwarded to Server A and I am up and running.


I have bought a second domain for serverB and want it set up like serverA but I am totally baffled on how I can resolve 2 domain names on a single network? I need (somehow) to try and tell the dns servers that when I enter in it will hit my static ISP IP as above and then hit my home router but then get directed/split to Server B and not to Server A.

I hope someone can understand what I am trying to achieve here. Its kinda hard to explain actually.

Basically all I want to do is name the machines and get traffic resolved to them.

Thanks for any help of suggestions.
Old 08-10-2010, 04:54 PM   #2
Senior Member
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi, my suggestion might be to use port forwarding on the user. Direct say port 80 at servera and port 8080 to port 80 on serverb... and then set the ports up with the relevant ports to the DNS... not sure on this last bit, if the DNS services will port with none standard ports like that.
Old 08-10-2010, 05:03 PM   #3
Registered: Aug 2010
Location: Atlanta
Distribution: ubuntu, debian
Posts: 142
Blog Entries: 2

Rep: Reputation: 22
DNS returns an ip address, not an ip address and a port..

If these are 2 web servers for general public use, you can't have port 80 forward to both - it MUST be port 80 and port 8080 or something, and you'll have to make sure your users know where to go.. Or any other port for that matter. Port 80 has to go from one to the other. Are your 2 servers offering distinct services? You could forward port 80 to one server, and port 25 to the other.

If it's not for public use, then you can use any port you want for any service you want - ie configure sshd for port 22 on one server and 222 on the other, then forward your ports accordingly and hit the right port. Is your edge router a linux box by any chance? httpd can do virtual hosting, sendmail can do multiple domains, etc.

What are the 2 servers for?


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
single IP multiple domain names jduckett01 Linux - Networking 2 08-26-2008 09:38 PM
Apache2 is serving single NameVirtualHost for all names r3gan Linux - Software 4 06-12-2008 11:33 AM
Multiple names for a single ip address netman4ttm Linux - Networking 4 08-27-2007 09:35 AM
Single IP multible domain names tangle Linux - Networking 4 11-25-2005 01:17 AM
replacing single quotes in file names adenardo Linux - General 2 05-27-2005 12:29 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration