Hello pluggers,

I'm having a firewall server having two ethernets. Let's say eth0 facing
internet and eth1 facing secured internal LAN. In here, I've also setup one
of our company's domain since we have 2 domains, (say it www.domain2.ph).
I'm trying to forward all incoming packets to my mail server having an
internal ip address of let's say, 192.168.1.5. I've used

iptables -t nat -A PREROUTING -i eth1 -p TCP --dport 25 -s 0.0.0.0/0 -j
DNAT --to 192.168.0.2:25

iptables -A FORWARD -p TCP -d 192.168.0.2 --dport 25 -s 0.0.0.0/0 -j ACCEPT

iptables -t nat -A PREROUTING -i eth1 -p TCP --dport 110 -s 0.0.0.0/0 -j
DNAT --to 192.168.0.2:110

iptables -A FORWARD -p TCP -d 192.168.0.2 --dport 110 -s 0.0.0.0/0 -j ACCEPT

iptables-save > /etc/sysconfig/iptables

Testing from outside network:

#telnet xxx.xxx.xxx.xxx 25
Trying xxx.xxx.xxx.xxx...

#telnet xxx.xxx.xxx.xxx 110
Trying xxx.xxx.xxx.xxx...

#nmap xxx.xxx.xxx.xxx
22/tcp     open        ssh
25/tcp     filtered    smtp
110/tcp    filtered    pop-3

How's this? Please help!

Olive






_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to