FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 04-25-2011, 11:00 PM
Ljubomir Ljubojevic
 
Default Packet routing diagram

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_iptable s#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:
http://www.shorewall.net/NetfilterOverview.html

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

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

, and then add (ip )route rules like in:
http://www.policyrouting.org/PolicyRoutingBook/ONLINE/CH05.web.html#5.6

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

policy nfmark 80 {default 10.0.1.100 }
or
policy from 192.168.2.0/24 { default 10.10.1.1 }
policy to 192.168.2.0/24 { default 10.10.1.1 }
etc...

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

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

Thread Tools




All times are GMT. The time now is 01:05 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org