I have two ethernet interfaces, namely eth0 and eth1.I want to implement an advanced routing rule but I am totally new to firewall/routing rules in CentOS.Here is what I am trying to do:Both my interfaces are up and connected to internet. I want to be able to decide dynamically based on the type of traffic through which interface it should go out.For example, if it is HTTP traffic, I want it to use eth0 and if it is FTP etc traffic, I want it to use eth1, while different type of traffic could have the SAME destination IP address. How can I accomplish this task?
Firewall/routing rule in Centos for this setup
linux;centos;iptables;firewall;routing
This Advanced Routing & Traffic Control HOWTO should have what you need.  Once you setup your networks, you'll want to write some rules that will mark packets to go over the alternate connection in iptables (see Chapter 11 Netfilter & iproute - marking packets).