0

Here's my setup (on a VPS):

  • 1 host running Linux (hostname: server1.example.com).
  • and 2 ip addresses: 1.2.3.4 and 1.2.3.5 (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):

example.com.       IN     SOA   .........
                                .........

;mail server
mail              IN      A     1.2.3.5
@                 IN      MX    10 mail

;web server
server1           IN      A     1.2.3.4

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?

2 Answers2

1

Yes,you can do it.

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

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

  3. Verify you services: telnet www.example.com 80 and telnet mail.example.com 25

lg.
  • 4,649
  • 3
  • 21
  • 20
  • 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... –  Oct 07 '10 at 12:28
0

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

Ignacio Vazquez-Abrams
  • 45,939
  • 6
  • 79
  • 84
  • 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) –  Oct 07 '10 at 12:32