[CentOS] Packet routing diagram

Mon Apr 25 23:00:10 UTC 2011
Ljubomir Ljubojevic <office at plnet.rs>

Kenneth Porter wrote:
> There's a number of diagrams around the Internet illustrating the path 
> packets take through the Linux kernel, including the various firewall 
> modules, that's quite helpful in understanding which rules should go in 
> which table.
> Here's one that's not bad:
> <http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch14_:_Linux_Firewalls_Using_iptables#Figure_14-1_Iptables_Packet_Flow_Diagram>
> The box labeled "Local Processing of Data" is where packets that are 
> created by the firewall's applications originate.
> Does anyone have a better diagram? How about one that shows the policy 
> routing system?

Maybe this one:

Policy routing is pretty straightforward. You mark the packet in PREROUTING:

iptables -t mangle -A PREROUTING -d -j MARK --set-mark 200

, and then add (ip )route rules like in: 

I use policy routing only on StarV3 Wireless/LAN routers and they very 
easy to set up policy routing:

policy nfmark 80 {default }
policy from { default }
policy to { default }

> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos