TC Command
hi
can any body solve me problem, i have two net card eth1=192.168.99.1 eth2-192.168.99.2 i want that my ssh will go from eth1 and rest will ge from eth2 . plese help thanks |
This has nothing to do with tc. There are several ways to do this. If you have iproute, you can do something like this:
# Mark ssh packets iptables -A PREROUTING -t mangle -p tcp --dport 22 -j MARK --set-mark 10 # Create routing table echo 200 outgoing-ssh >> /etc/iproute2/rt_tables # Add rule to send marked packets to our new routing table ip rule add fwmark 1 table outgoing-ssh # Default route in our new routing table <192.168.99.254> = default gw ip route add default via 192.168.99.254 dev eth2 table outgoing-ssh Or you can patch netfilter to support the ROUTE target and do this: iptables -A PREROUTING -t mangle -p tcp --dport 22 -j ROUTE --oif eth2 |
All times are GMT -5. The time now is 01:52 AM. |