On 16 Jul 2003 09:03:17 -0700, David Meier <(E-Mail Removed)> wrote:
> Hi all,
>
> I need some input to get me started on the following issue:
>
> I want to build a firewall (with iptables) on a server with two NIC's.
> The first has an official IP Addres (let's say 1.2.3.4) and the second
> one connects to an internal network (10.0.0.0). Now I want to put two
> or more mail servers and/or web servers in that private network each
> of them answering request for a differnt domain. Is it possible to
> forward request in the following way, let's say for email traffic?
>
> domain1.com -> 1.2.3.4 on Port 25 -> 10.0.0.1 on Port 25
> domain2.com -> 1.2.3.4 on Port 25 -> 10.0.0.2 on Port 25
>
> I don't know if this can be solved using iptables or not (newbie). I
> would appreciate any input on this.
iptables knows nothing about hostnames (just IPs). You need an smtp
server on the firewall that will relay to the appropriate internal host.
And to do that, you would likely need either mailertable entries
(sendmail) or transport file entries (postfix) to relay the mail to the
private name or IP (in square brackets) of each internal server.
I have 3 smtp servers just to test things and learn how they work
(no-ip.com names). 1 (primary) receives mail for itself and another box
(used for fetchmail, which can also send). The primary server also relays
any mail addressed to my wireless laptop to my laptop (which can also
send). Everything works, including relaying only SBC Yahoo related mail
through their authenticated outgoing relay, and any other mail directly.
Similarly at out factory, we have a RedHat smtp server that virus filters
all incoming/outgoing mail, and relays mail for certain mobile users to an
internal exchange server, so they can access their mail from anywhere
using Outlook Web Access (different public IP).
--
David Efflandt - All spam ignored
http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/