NF_IP_PRE_ROUTING?
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
Sorry, nevermind