From: "Pit Linnartz" <linnartz@software-ag.de>
Subject: Re: packetfiltering. how to use it?
Date: 1999/10/19 [thread overview]
Message-ID: <7uiken$1ek$1@gamma.ecomp.net> (raw)
In-Reply-To: 7ui7ul$cgs$1@nserve1.acs.ucalgary.ca
Serguei Patchkovskii wrote in message
<7ui7ul$cgs$1@nserve1.acs.ucalgary.ca>...
>Alexei Sorokin (Alexei.Sorokin@rcm.nnov.ru) wrote:
>: i have installed packetfilter package on DU4.0f and configured kernel as
>: described in man.
>: however i can't still understand how to tune packetfilter to reject some
>: tcp/udp packets.
>: let's say how can i filter all smtp (tcp 25) or dns (udp 53) packets?
>
>You can't. The packetfilter interface in DU is for programs which wish
>to access raw Ethernet packets to do some processing IN ADDITION to
>whatever is done by the kernel. This is particularly useful for packets
>which kernel "processes" by dropping them :-)
>
>You can configure DU IP stack to drop *all* packets coming from a range
>of IP adresses (see man ifconfig). However, this does not allow you to
>selectively drop packets depending on port and protocol.
>
The given answer is right. The question is what you really want. If you want
to act
as a gateway, and filter traffic, take a look at screend (8).
If you want to look at the data. you did the right thing by configuring the
packetfilter.
now you have to check the mode with pfstat(1), and enable it via
pfconfig(8).
After you have done this, you can use tcpdump(8) to obtain the packets.
(ex: tcpdump host <hostname> and port 25) will show you the smtp packets.
there are a lot more options to tcpdump.
packetfilter(8) points also to examples written in C
Pit
prev parent reply other threads:[~1999-10-19 4:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-19 4:00 packetfiltering. how to use it? Alexei Sorokin
1999-10-19 4:00 ` Serguei Patchkovskii
1999-10-19 4:00 ` Pit Linnartz [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox