Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Aldo S. Lagana" <alagana@discmail.com>
To: 'Travis Crook' <travis@visionsbeyond.com>, netfilter@lists.netfilter.org
Subject: RE: Email troubles behind iptables firewall
Date: Thu, 12 Sep 2002 11:43:53 -0400	[thread overview]
Message-ID: <001c01c25a73$328e9860$3864a8c0@discmail.com> (raw)
In-Reply-To: <002c01c25a68$fde16160$6902a8c0@visionsbeyond.mindtrip>


> 
> Hi all,
>     I have an iptables firewall setup to route web, ftp 
> and email traffic to internal servers.  My internal 
> servers have ip addresses in the 192.168.2. range.  
> The problem I am having is that my email server is 
> being used as a spam box (not by me but by someone 
> else on the internet - not with my approval either).
> 
> My question is this:  Qmail is my mail server.  It is 
> supposed to only allow relaying by certain clients.  
> As far as I know it is set up this way.  I think the 
> problem occurs because I allow 192.168.2. ip 
> addresses to relay mail (i.e. everyone behind the 
> firewall).  But every email coming in to the mail 
> server gets a 192.168.2. ip address.  Is this 
> correct?  Is there any way to pass their real ip 
> address through the firewall to the mail server?

We had that problem (using sendmail mind you) when we were running
ipchains.  Moving to iptables has since solved that problem.  The reason
it was a problem (I think) was that we were 'redirecting' incoming
connections to an internal IP address before forwarding it.  Now with
iptables and DNAT, the mail gets directly forwarded without mangling the
source IP address - thus allowing sendmail to have rules to not allow
relay for external addresses and to allow it for internal addresses.  

So if you are correctly using iptables with DNAT it should work as you
want.

> 
> Any help would be greatly appreciated.  I can 
> post the firewall script, etc. if needed.
> 
> Thanks
> 
> Travis Crook
> Visions Beyond
> 



  reply	other threads:[~2002-09-12 15:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-12 14:30 Email troubles behind iptables firewall Travis Crook
2002-09-12 15:43 ` Aldo S. Lagana [this message]
2002-09-12 15:58 ` Antony Stone
2002-09-17 17:10   ` Travis Crook
  -- strict thread matches above, loose matches on Subject: below --
2002-09-12 15:07 Travis Crook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001c01c25a73$328e9860$3864a8c0@discmail.com' \
    --to=alagana@discmail.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=travis@visionsbeyond.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox