[LARTC] Several IP's, one mail and http server

Aleksander aleksander at krediidiinfo.ee
Mon Jan 2 15:40:54 CET 2006


Hi,

I want to have several IP's for my connection and each IP will have it's 
own hostname.

Now I want to serve a web server and mail server for each 
hostname/IP_addr pair on the same box in the internal LAN using one 
apache and one postfix daemon.

If I do one SNAT and several DNATs then only the hostname which I SNAT 
the server to would work.

Is the only way to do it correctly by assigning the internal server 
several IP's (virtual interfaces) and then make SNAT and DNATs for each 
interface/IP_addr individually?

ATM I've got one IP and several hostnames. Using DNAT and apache's name 
based virtual hosts things work. Planning on getting each hostname it's 
own IP address, but continue to use the same http server for all the 
hosts, at least for now.

Configuring the mail server might be even trickier, don't know if 
Postfix supports listening on different interfaces and have a different 
hostname for each interface/IP. I know it's OK if Postfix tells SMTP 
clients that its hostname is A, although the clients connected to 
hostname B, but it's still ugly.

The gateway and server are linuxes (correct spelling?) of course. And 
the gateway stays, the server has to stay in the LAN. So would the 
virtual interface solution work and is it the only one?

Thanks in advance,
    Alex


More information about the LARTC mailing list