Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's my setup (on a VPS):

  • 1 host running Linux (hostname:
  • and 2 ip addresses: and (for that host.)

What I would like to do is to run a web server on the first address and a mail server on the second address having 2 A records in the DNS zones file, something along this lines (pardon my syntax):       IN     SOA   .........

;mail server
mail              IN      A
@                 IN      MX    10 mail

;web server
server1           IN      A

www               IN      CNAME server1

But, if I have understood correctly, this is not possible because the two addresses are actually pointing to the same host (server1). Am I wrong?

The point is, I don't know what to do with the second address, so I thought to run the mail server on it, but then I discovered that it was not possible (or so I have understood)

Is there a solution or I should just forget all about it and keep the spare address for... nothing?

share|improve this question
up vote 1 down vote accepted

Yes,you can do it.

  1. Test you DNS configuration from external (from a pc out of your network). If you ping you should receive response from ip and if you ping you should receive response from ip

  2. Configure web server to listen only on ip and mail server to listen only on ip

  3. Verify you services: telnet 80 and telnet 25

share|improve this answer
Thanks... This destroys what I have understood about DNS configuration but I am glad that my gut feelings where actually correct... I know I should have actually tested the thing, but hey, since I could ask... – user56381 Oct 7 '10 at 12:28

Most daemons allow themselves to be configured to bind to specific addresses; investigate their documentation for how.

share|improve this answer
I know how to bind the services I run to specific addresses... my problem was with the DNS configuration itself. I never had to do anything like this with DNS up until now and docs on DNS setup are not so clear cut (at least for me, I might be particularly thick) – user56381 Oct 7 '10 at 12:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.