Hi,

I'm trying to get transparent smtp to an internal smtp server (not running
on the firewall) working with 4.0 (debian lenny). But can't get it to work
the way i want. I had it working with my old iptables script with the
following rules:
#iptables -A FORWARD -p tcp -d 192.168.x.21 --dport 25 -m state --state
NEW,ESTABLISHED,RELATED -j ACCEPT
#iptables -t nat -A PREROUTING -i ! eth1 -p tcp -s ! 192.168.x.21 -d 0/0
--dport 25 -m state --state NEW,ESTABLISHED,RELATED -j DNAT --to
192.168.x.21:25


I tried the squid trick using providers/tcrules but when trying to connect
from a client i get: No route to host

providers:
smtptest        1        202        -                eth0               
192.168.x.21        loose

tcrules:
202:P        eth0:!192.168.x.21        0.0.0.0/0        tcp        25

interfaces:
loc        eth0                detect                routeback

client connection:
telnet x.x.x.x 25
Trying x.x.x.x...
telnet: Unable to connect to remote host: No route to host


Also i tried the FAQ 2 trick. That does work however the smtp server logs
the connections as coming from the firewall. For logging purposes i want
the real client ip logged.

masq:
eth0:192.168.x.21        eth0                        192.168.x.1       
tcp        smtp

rules:
DNAT            loc:!192.168.x.21      loc:192.168.x.21:25            tcp
   smtp


I then tried with only the rule in the rules file

This does seem to get the connection to the right server as seen by ippl.
But no real connection is established.
Telnet keeps trying and ippl keeps logging connection attempts.

I tried playing around with SAME: and nodst: in the address column in the
masq file, but can't seem to get the syntax right. I noticed newer
shorewall versions support the use of NONAT in that column. I guess that's
what i need.
Do i have to upgrade to a newer version of shorewall or am i doing it all
wrong ?



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to