Hi there!
I trying to understand how one would to setup a small business network
using a tri-homed firewall using iptables. This is not for a real
network, but for my learning. I am still Linux newbie, so please be
kind to me :-)
Lets say I have some Cisco router that connects to my ISP (who
provided me with one IP number).
Also,I also have a computer with three network interface cards:
eth0 with 202.54.1.1 public IP address - WAN connected to router
eth1 with 192.168.1.1 private IP address - Internal LAN with
workstations
eth2 with 192.168.2.1 private IP address - DMZ connected to Mail, Web,
DNS and perhaps a FTP server
Here is where I need help with understanding.
1. Do I need two public IP addresses to make this work (one for the
router and one for eth0) or is there another way to configure this?
2. I obviously want NAT for the Internal and DMZ network to work. How
would the iptables command look to forward incoming mail to the mail
server. Do I use something like this:
iptables -t nat -A PREROUTING -p tcp -i eth0 -d 202.54.1.1 --dport 25 -
j DNAT --to destination 192.168.2.x
3. What IP address goes into the DNS server for the Mail, Web, etc
servers in the DMZ. Do you specify the IP address of eth0 for each
server and then rely on NAT to point it to the correct server
depending on the destination port number? How does this work?
4. I have seen a few diagrams on the internet where a DNS caching
server is installed on the internal network. I assume the internal DNS
only have the entries of the servers on the internal network, and
lookups are forwarded to the DNS in the DMZ if it needs and IP address
for any other Internet servers. Is this the preferred reasonable
approach?
5. Some sites suggest a mail relay in the DMZ. I assume the actual
mail server then goes on the internal network. Does the mail relay
server still allow pop/imap access from outside. This obviously also
require a forwarding rule for port 25 to internal server. Is this how
it works?
Sorry, it's quite a handful of questions. Any help will be
appreciated!
Thx in advance.
Hein
Replies