Linux Netfilter discussions
 help / color / mirror / Atom feed
* forward command for smtp/pop - not working
@ 2005-05-21 10:28 varun_saa
  0 siblings, 0 replies; only message in thread
From: varun_saa @ 2005-05-21 10:28 UTC (permalink / raw)
  To: netfilter

Hello,
     My server is on FC3 (fedora3)
eth0 is WAN ( dynamic IP )
eth1 is LAN

This a continuation of my most recent post 
" smtp/pop and NAT only " .

I have set the rules as follows :

# Generated by iptables-save v1.2.11 on Wed May 11 11:06:56 2005
*nat
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o eth0 -s 192.168.0.0/24 -j MASQUERADE
COMMIT
# Completed on Wed May 11 11:06:56 2005
# Generated by iptables-save v1.2.11 on Wed May 11 11:06:56 2005
*mangle
:PREROUTING ACCEPT [93:9058]
:INPUT ACCEPT [85:8650]
:FORWARD ACCEPT [8:408]
:OUTPUT ACCEPT [88:8886]
:POSTROUTING ACCEPT [95:9218]
COMMIT
# Completed on Wed May 11 11:06:56 2005
# Generated by iptables-save v1.2.11 on Wed May 11 11:06:56 2005
*filter
:INPUT ACCEPT [85:8650]
:FORWARD ACCEPT [8:408]
:OUTPUT ACCEPT [87:8810]
-P FORWARD DROP
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth1 -o eth0 -s 192.168.0.248 -j ACCEPT
-A FORWARD -i eth1 -o eth0 -s 192.168.0.253 -j ACCEPT
-A FORWARD -i eth1 -o eth0 -p tcp --dport 25 -j ACCEPT
-A FORWARD -i eth1 -o eth0 -p tcp --dport 110 -j ACCEPT
COMMIT
# Completed on Wed May 11 11:06:56 2005

The clients 192.168.0.248 / 253 are able browse and
send/recieve mails.

But other clients are not able to send/recieve mails.

Here are fews things that I did:

From fedora3 server :

[root@fedora3 ~]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
search saice.edu
nameserver 203.145.184.13


[root@fedora3 ~]# telnet 64.233.185.27 25
Trying 64.233.185.27...
Connected to gsmtp185.google.com (64.233.185.27).
Escape character is '^]'.
220 mx.gmail.com ESMTP g3si533838wra

From non NAT clients :

[root@ ~]# cat /etc/resolv.conf
nameserver 203.145.184.13
                                                                                
# ppp temp entry


[root@ ~]# telnet 64.233.185.27 25
Trying 64.233.185.27...
Connected to 64.233.185.27 (64.233.185.27).
Escape character is '^]'.
220 mx.gmail.com ESMTP 35si1283118wra
quit
221 2.0.0 mx.gmail.com closing connection
Connection closed by foreign host.
[root@ ~]#

I am not able to ping ISP gateway or DNS.

Non NAT are not able send/recieve mails.

I don't understand why this FORWARD command
does not work. 

Or have I forgotten something ?

Can't we just use PREROUTING command for smtp
and pop.

Thanks in advance

Varun




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-21 10:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-21 10:28 forward command for smtp/pop - not working varun_saa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox