Routing traffice based on port
Assume a scenario where we have 2 NICs, eth1 and eth2. eth1 has the IP address 184.108.40.206 and eth2 has 220.127.116.11. Using 18.104.22.168 as gateway would route all Internet traffic through eth1, while having 22.214.171.124 as gateway would route traffic through eth2.
Assume we want traffic to IP address 126.96.36.199 and port 80 to be processed by one route using eth1, while traffic to the same IP address on port 443 should be processed by route using eth2.
In linux we have this ability by using route tables and iptables
ip route add table 10 0.0.0.0/0 via 188.8.131.52
ip route add table 20 0.0.0.0/0 via 184.108.40.206
iptables -t mangle -A FORWARD -d 220.127.116.11/32 -p tcp --dport 80 -j MARK --set-mark 80
iptables -t mangle -A FORWARD -d 18.104.22.168/32 -p tcp --dport 443 -j MARK --set-mark 443
ip rule add fwmark 80 table 10
ip rule add fwmark 443 table 20
I am looking for something similar in windows, a policy based routing mechanism. Can this be achieved?