Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Sep 2006 16:34:02 -0400
From:      Bill Moran <wmoran@collaborativefusion.com>
To:        Chuck Swiger <cswiger@mac.com>
Cc:        freebsd-questions@freebsd.org, Bart Silverstrim <bsilver@chrononomicon.com>
Subject:   Re: forwarding as a gateway, logging certain traffic
Message-ID:  <20060912163402.fe6d7325.wmoran@collaborativefusion.com>
In-Reply-To: <B7DDE980-7DB8-4AB8-AA85-8FD89638469C@mac.com>
References:  <7269D41C-C334-44DC-9549-ACB28F79014A@chrononomicon.com> <20060912160830.b7a91061.wmoran@collaborativefusion.com> <B7DDE980-7DB8-4AB8-AA85-8FD89638469C@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In response to Chuck Swiger <cswiger@mac.com>:

> On Sep 12, 2006, at 1:08 PM, Bill Moran wrote:
> >> Is there some way to get the FreeBSD system to log machines using
> >> port 25 without interfering with the FreeBSD machine's filtering of
> >> email function?  Or at least make the traffic visible to sniffing
> >> with tcpdump or wireshark or ethereal?
> >
> > Off the top of my head ...
> > ipfw add 25 log tcp from any to any 25
> > should work.  There are certain kernel configs you have to have in
> > place for logging to work, though.
> 
> Better to use something like:
> 
> 	ipfw add 1 log tcp from any to me 25 setup

Yeah, that would be more concise.

As a more permanent solution, why not set up ipfw on the FreeBSD
machine to refuse to allow this to happen ever?

ipfw add 5 allow tcp from any to me 25 setup
ipfw add 6 allow tcp from me to any 25 setup
ifpw add 7 drop tcp from any to any 25 setup

I don't remember the rest of the rulset, but if you have an "established"
rule, this should force all SMTP to use this machine as a relay, although
you may need to tweak the rules to get them working right around nat.

-- 
Bill Moran
Collaborative Fusion Inc.

****************************************************************
IMPORTANT: This message contains confidential information and is
intended only for the individual named. If the reader of this
message is not an intended recipient (or the individual
responsible for the delivery of this message to an intended
recipient), please be advised that any re-use, dissemination,
distribution or copying of this message is prohibited. Please
notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The
sender therefore does not accept liability for any errors or
omissions in the contents of this message, which arise as a
result of e-mail transmission.
****************************************************************



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060912163402.fe6d7325.wmoran>