kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* packet drop
@ 2014-05-15  4:26 Varun Sharma
  2014-05-15 16:09 ` michi1 at michaelblizek.twilightparadox.com
  0 siblings, 1 reply; 2+ messages in thread
From: Varun Sharma @ 2014-05-15  4:26 UTC (permalink / raw)
  To: kernelnewbies

Hi All,

I am sending packet between two back to back connected machine.when I
use same network (192.168.7.x) packet reach upto NF_IP_LOCAL_IN
(IPTABLES INPUT) hook.It is accepted.

But when I spoof ip address network(192.168.8.x) it pass
NF_IP_PRE_ROUTING hook but dropped before NF_IP_LOCAL_IN hook.

case 1:

192.168.7.12 --> 192.168.7.19         Accepted.

case 2:

 192.168.8.25 --> 192.168.7.19       Dropped.

I didn't get why it dropped ? How network change effect on routing
inside kernel tcp/ip stack ?

Regards
Varun

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

* packet drop
  2014-05-15  4:26 packet drop Varun Sharma
@ 2014-05-15 16:09 ` michi1 at michaelblizek.twilightparadox.com
  0 siblings, 0 replies; 2+ messages in thread
From: michi1 at michaelblizek.twilightparadox.com @ 2014-05-15 16:09 UTC (permalink / raw)
  To: kernelnewbies

Hi!

On 09:56 Thu 15 May     , Varun Sharma wrote:
> Hi All,
> 
> I am sending packet between two back to back connected machine.when I
> use same network (192.168.7.x) packet reach upto NF_IP_LOCAL_IN
> (IPTABLES INPUT) hook.It is accepted.
> 
> But when I spoof ip address network(192.168.8.x) it pass
> NF_IP_PRE_ROUTING hook but dropped before NF_IP_LOCAL_IN hook.
> 
> case 1:
> 
> 192.168.7.12 --> 192.168.7.19         Accepted.
> 
> case 2:
> 
>  192.168.8.25 --> 192.168.7.19       Dropped.
> 
> I didn't get why it dropped ? How network change effect on routing
> inside kernel tcp/ip stack ?

Maybe you have "Reverse Path Filtering" turned on:
http://lartc.org/howto/lartc.kernel.html

Try setting /proc/sys/net/ipv4/conf/*/rp_filter to "0".

	-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com

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

end of thread, other threads:[~2014-05-15 16:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-15  4:26 packet drop Varun Sharma
2014-05-15 16:09 ` michi1 at michaelblizek.twilightparadox.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).