All of lore.kernel.org
 help / color / mirror / Atom feed
* incoming interface confusion question
@ 2004-06-21 17:45 Shaun T. Erickson
  2004-06-21 19:28 ` Shaun T. Erickson
  2004-06-21 19:36 ` Cedric Blancher
  0 siblings, 2 replies; 13+ messages in thread
From: Shaun T. Erickson @ 2004-06-21 17:45 UTC (permalink / raw)
  To: netfilter

Are there any cases where iptables can be confused about what interface 
a packet came in on? Can a packet arriving on interface A ever be 
reported as arriving on interface B?

I had an incident this weekend, and am trying to be certain that the 
packets came in the interface my system said it did. It's a Red Hat 9 
system, running their stock 2.4.20-8 kernel.

	-ste


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: incoming interface confusion question
@ 2004-06-22 10:56 aksingh
  2004-06-22 12:52 ` Shaun T. Erickson
  0 siblings, 1 reply; 13+ messages in thread
From: aksingh @ 2004-06-22 10:56 UTC (permalink / raw)
  To: Ranjeet Shetye; +Cc: netfilter





Hi,

   I am trying to spoof a TCP connection, I do a telnet from machine A to
machine B and then catch a packet in between and thn try and send a reset
to machine A, by generating the TCP packet myself, the packet going out
from machine A are caught on machine A itself. To make this work I need to
call netif_rx with an skb I allocate, but when I do this, the TCP socket on
machine A does not get the packet, I suspect it is being dropped by
netif_rx(), what all does one have to make sure to be sure that netif_rx()
hands the packet to ip and packet is not dropped (besides checksum and
all).
I looked at netif_rx, I have to set the incoming interface device  here. So
what I do is, I copy the incoming interface device structure of the first
packet I catch in the pre rotuing hook and and give that as the incoming
device in the skbuff containing the RST, is that ok ? or what kind of hack
do I need. If someone has tried this earlier, would appreciate if u give me
some pointers.

thanks
Amit




Ranjeet Shetye <ranjeet.shetye2@zultys.com>@lists.netfilter.org on
06/22/2004 02:04:36 AM

Sent by:    netfilter-admin@lists.netfilter.org


To:    netfilter@lists.netfilter.org
cc:

Subject:    Re: incoming interface confusion question


* Cedric Blancher (blancher@cartel-securite.fr) wrote:
> Le lun 21/06/2004 à 19:45, Shaun T. Erickson a écrit :
> > Are there any cases where iptables can be confused about what interface
> > a packet came in on? Can a packet arriving on interface A ever be
> > reported as arriving on interface B?
>
> I'm not aware of such a case. Would be quite surprising.
>
> > I had an incident this weekend, and am trying to be certain that the
> > packets came in the interface my system said it did. It's a Red Hat 9
> > system, running their stock 2.4.20-8 kernel.
>
> Do you have any reason to think your system was wrong ?
>

In order of likelihood, (highest to lowest):

1) http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.kernel.rpf.html

Check your /proc/sys/net/ipv4/conf/$INTF/rp_filter setting.

If it is not set, someone might have tried to attack your network from
the public side, using private src ips. e.g. this can be used for an
attack to make javaVM think that the packets are coming from the host
itself or a trusted server.

2) If it is set, then a VPN might still allow such packets into your
network, past a firewall.

3) If neither, then it might be an issue with the code in Linux.

HTH

--
Ranjeet Shetye
Senior Software Engineer
Zultys Technologies
Ranjeet dot Shetye at Zultys dot com
http://www.zultys.com/

The views, opinions, and judgements expressed in this message are solely
those of
the author. The message contents have not been reviewed or approved by
Zultys.






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

end of thread, other threads:[~2004-06-22 12:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-21 17:45 incoming interface confusion question Shaun T. Erickson
2004-06-21 19:28 ` Shaun T. Erickson
2004-06-21 20:18   ` John A. Sullivan III
2004-06-21 21:13     ` incoming interface confusion question [LONG] Shaun T. Erickson
2004-06-21 22:28       ` incoming interface confusion question Antony Stone
2004-06-21 23:07         ` Shaun T. Erickson
2004-06-22  0:13           ` [SOLVED] " Shaun T. Erickson
2004-06-21 22:33       ` incoming interface confusion question [LONG] John A. Sullivan III
2004-06-22  6:37   ` incoming interface confusion question Jozsef Kadlecsik
2004-06-21 19:36 ` Cedric Blancher
2004-06-21 20:34   ` Ranjeet Shetye
  -- strict thread matches above, loose matches on Subject: below --
2004-06-22 10:56 aksingh
2004-06-22 12:52 ` Shaun T. Erickson

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.