how iptables/NAT work together

dave-mlist@bfnet.com dave-mlist@bfnet.com
13 Jul 2000 09:57:21 -0700


The other day, I wrote:
Me> Regarding the diagram below,
Me> 
Me> Why doesn't output from "Local Process" have to go through "Routing
Me> Decision?"

Thus spake Rusty:
Rusty> Yep, I handwaved.

But output from "Local Process" doesn't go through "Forward", right?
How does "Forward" know not to filter those packets that came from
"Local Process"?

Dave


      ________                     _____       _________
In   /        \                   /     \     /         \   Out
--->|PREROUTING|-->[Routing ]--->|FORWARD|---|POSTROUTING|---->
     \________/    [Decision]     \_____/     \_________/ 
                      |                            ^
                      v                           _|__
                     ___                         /    \
                    /   \                       |OUTPUT|
                   |INPUT|                       \____/
                    \___/                          ^
                      |                            |
                       -------> Local Process -----