LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   sendmail and forwarded ports question (https://www.linuxquestions.org/questions/linux-security-4/sendmail-and-forwarded-ports-question-212487/)

red.lego.man 08-02-2004 09:42 AM

sendmail and forwarded ports question
 
I have setup a small network at home, and I have an old dell laptop, running fedora 1, acting as a firewall/router to my ADSL connection. I have a much better desktop pc running fedora 2 which is also acting as my smtp server.

I have forwarded tcp/udp on port 25 from the dell to the fedora2 box.

Now I have an open relay because sendmail on the fedora2 sees the mail as coming from the dell box, not from the original host.

When I use the same sendmail config on the dell box without forwarding the ports, the dell box does NOT act as a relay.

How can I get the firewall to forward packets without them appearing to come from the dell machine but actually come from the originating spammer, and reject relaying?

Thanks
Andy

peter_robb 08-02-2004 02:25 PM

Have a look at your masquerading/SNAT rule and make sure it only specifies the one eth connection outward to your ISP, eg
iptables -t nat -o eth1 -j MASQUERADE


All times are GMT -5. The time now is 08:51 PM.