All of lore.kernel.org
 help / color / mirror / Atom feed
* NF_IP_PRE_ROUTING?
@ 2005-09-16 19:45 scarab
  2005-09-17  1:30 ` NF_IP_PRE_ROUTING? scarab
  0 siblings, 1 reply; 2+ messages in thread
From: scarab @ 2005-09-16 19:45 UTC (permalink / raw)
  To: netfilter-devel

Hi
I wrote simple linux firewall (nf_hook based). Below  is part of that code:
------------
static struct nf_hook_ops       lpf_nfh;

lpf_nfh.hook = lpf_hook_fn; 
lpf_nfh.hooknum = NF_IP_PRE_ROUTING; 
lpf_nfh.pf = PF_INET;  
lpf_nfh.priority = NF_IP_PRI_FIRST; 

nf_register_hook(&lpf_nfh); 
--------------
 
I have question. It should get only incoming packets so why it takes outgoing 
to? If i will use  NF_IP_POST_ROUTING [4] then it should get outgoing packets 
right? I found that diagram in "Linux netfilter hacking howto":

--->[1]--->[ROUTE]--->[3]--->[4]--->
                          |                   ^
                          |                    |
                          |              [ROUTE]
                          v                    |
                         [2]                [5]
                          |                   ^
                          |                    |
                          v                    |

Can anyone tell me why it works that way?
Thank you

PS. Sorry for my poor english

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

* Re: NF_IP_PRE_ROUTING?
  2005-09-16 19:45 NF_IP_PRE_ROUTING? scarab
@ 2005-09-17  1:30 ` scarab
  0 siblings, 0 replies; 2+ messages in thread
From: scarab @ 2005-09-17  1:30 UTC (permalink / raw)
  To: netfilter-devel

Sorry, nevermind

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

end of thread, other threads:[~2005-09-17  1:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-16 19:45 NF_IP_PRE_ROUTING? scarab
2005-09-17  1:30 ` NF_IP_PRE_ROUTING? scarab

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.