All of lore.kernel.org
 help / color / mirror / Atom feed
* tcpdump and Iptables
@ 2004-09-02 17:56 CC
  2004-09-02 18:06 ` Jason Opperisano
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: CC @ 2004-09-02 17:56 UTC (permalink / raw)
  To: netfilter

Hi,

I think I've asked this before here, but I
don't remember what the answer was.

If I have iptables running and I do a
tcpdump -i eth0,   at what point is
tcpdump listening to the connection?

I'm trying to troubleshoot my firewall,
but am not seeing the right behaviour
as the packets that I'm trying to block
by the following command:

$IPTABLES -A FORWARD -i eth1 -p tcp \
              -d 192.168.7.1 -j DROP

But I still get tcp packets going to
192.168.7.1.

And wouldn't :

$IPTABLES -A FORWARD -i eth1 -p tcp \
             -s 192.168.7.1 -j DROP

in effect disables all access to the
internet for machine IP 192.168.7.1?

But my main query is about the
relationship between the packets that
TCPDUMP sees and where the packets
are within the packet filtering
process.

Thanks




^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: tcpdump and Iptables
@ 2004-09-03 14:23 Hudson Delbert J Contr 61 CS/SCBN
  0 siblings, 0 replies; 9+ messages in thread
From: Hudson Delbert J Contr 61 CS/SCBN @ 2004-09-03 14:23 UTC (permalink / raw)
  To: 'Netfilter Mailing List'

netcat (nc shows up under ps) might be usefull...

itsa net utility which does I-O across connex using tcp/ip.

it can make its paths or driven by other programs like ssh.

its got a lot of debug and discovery modules in it so it can (and has)
create
almost any kind of connection..........and some other `interesting
built-ins`.

does:

any tcp or udp 
any direction
any tcp port
any udp port

sound godd...wait ther's more..

tunnel with any/all params on/off.
excellent at port-scanning YOUR own networks
clock controlled buffered send-mode like 1 every X seconds
hexdump
std<err,out> available which means this stuff can be send to tthe syslogs if
desired.


and as usual mileage will vary.....make sure you have permission to do this
if you aint sure ask again...

nufsaid.

v/r,
~piranha


-----Original Message-----
From: netfilter-bounces@lists.netfilter.org
[mailto:netfilter-bounces@lists.netfilter.org]On Behalf Of Nick Drage
Sent: Friday, September 03, 2004 3:23 AM
To: netfilter@lists.netfilter.org
Subject: Re: tcpdump and Iptables


On Fri, Sep 03, 2004 at 08:41:42AM +0800, cc wrote:
> Nick Drage wrote:

> >>If I have iptables running and I do a tcpdump -i eth0,   at what
> >>point is tcpdump listening to the connection?
> >
> >tcpdump will see the packets before IPTables does anything to them.
> 
> Thanks NIck for the info.  Exactly what I wanted to know.

Thanks... though Jason's explanation was rather better :)

tcpdump is an excellent tool, but ( excuse me if I'm stating the obvious
), don't underestimate the usefulness of the logging rules in IPTables
combined with 

tail -f /var/log/$logfile | grep $string_you_are_looking_for

-- 
mors omnia vincit


^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: tcpdump and Iptables
@ 2004-09-03 14:27 Hudson Delbert J Contr 61 CS/SCBN
  0 siblings, 0 replies; 9+ messages in thread
From: Hudson Delbert J Contr 61 CS/SCBN @ 2004-09-03 14:27 UTC (permalink / raw)
  To: 'Netfilter Mailing List'


oops,,,sorry list i forgot to mention that one should
manipulate SO_BROADCAST option on UDP sockets.

this doesnt work on TCP so you are on your own on that one..

ignore the bogus manner in which it treats bcast addresses.

the other info is worth the trade off.

v/r
~piranha

-----Original Message-----
From: piranha
Sent: Friday, September 03, 2004 7:23 AM
To: 'Netfilter Mailing List'
Subject: RE: tcpdump and Iptables


netcat (nc shows up under ps) might be usefull...

itsa net utility which does I-O across connex using tcp/ip.

it can make its paths or driven by other programs like ssh.

its got a lot of debug and discovery modules in it so it can (and has)
create
almost any kind of connection..........and some other `interesting
built-ins`.

does:

any tcp or udp 
any direction
any tcp port
any udp port

sound godd...wait ther's more..

tunnel with any/all params on/off.
excellent at port-scanning YOUR own networks
clock controlled buffered send-mode like 1 every X seconds
hexdump
std<err,out> available which means this stuff can be send to tthe syslogs if
desired.


and as usual mileage will vary.....make sure you have permission to do this
if you aint sure ask again...

nufsaid.

v/r,
~piranha


-----Original Message-----
From: netfilter-bounces@lists.netfilter.org
[mailto:netfilter-bounces@lists.netfilter.org]On Behalf Of Nick Drage
Sent: Friday, September 03, 2004 3:23 AM
To: netfilter@lists.netfilter.org
Subject: Re: tcpdump and Iptables


On Fri, Sep 03, 2004 at 08:41:42AM +0800, cc wrote:
> Nick Drage wrote:

> >>If I have iptables running and I do a tcpdump -i eth0,   at what
> >>point is tcpdump listening to the connection?
> >
> >tcpdump will see the packets before IPTables does anything to them.
> 
> Thanks NIck for the info.  Exactly what I wanted to know.

Thanks... though Jason's explanation was rather better :)

tcpdump is an excellent tool, but ( excuse me if I'm stating the obvious
), don't underestimate the usefulness of the logging rules in IPTables
combined with 

tail -f /var/log/$logfile | grep $string_you_are_looking_for

-- 
mors omnia vincit


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-09-03 17:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-02 17:56 tcpdump and Iptables CC
2004-09-02 18:06 ` Jason Opperisano
2004-09-02 18:07 ` Nick Drage
2004-09-03  0:41   ` cc
2004-09-03 10:23     ` Nick Drage
2004-09-03 17:20   ` Jose Maria Lopez
2004-09-02 20:25 ` Jose Maria Lopez
  -- strict thread matches above, loose matches on Subject: below --
2004-09-03 14:23 Hudson Delbert J Contr 61 CS/SCBN
2004-09-03 14:27 Hudson Delbert J Contr 61 CS/SCBN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.