LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   TC Command (https://www.linuxquestions.org/questions/debian-26/tc-command-423100/)

apenguinlinux 03-09-2006 04:47 AM

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

dracae 03-09-2006 08:34 AM

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.