1

I am reading some tutorial on the webpage iptables tutorial.
There are five chains in iptables.

PREROUTING chain
OUTPUT chain
FORWARD chain
INPUT chain
POSTROUTING chain

And there are four tables in iptables.

filter table
nat  table
mangle table
raw table

Only mangle table contains all five types of chains.

Mangle table has the following built-in chains.

PREROUTING chain
OUTPUT chain
FORWARD chain
INPUT chain
POSTROUTING chain

1.Why filter table has the three following built-in chains ?

INPUT chain 
OUTPUT chain 
FORWARD chain 

Why not contains five types of chains?

2.Why nat table has the three following built-in chains.

PREROUTING chain 
POSTROUTING chain 
OUTPUT chain 

Why not contains five types of chains?

3.Why raw table has the following two built-in chains?

PREROUTING chain
OUTPUT chain

Why not contains five types of chains?

2

First try to understand what netfilter does, and what is the path of a packet in kernel space. (http://inai.de/images/nf-packet-flow.svg) enter image description here And read docs from the original http://netfilter.org/ ; your linked iptables howto is very low quality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.