LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-09-2006, 04:47 AM   #1
apenguinlinux
Member
 
Registered: Dec 2004
Distribution: debian
Posts: 91

Rep: Reputation: 15
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
 
Old 03-09-2006, 08:34 AM   #2
dracae
Member
 
Registered: Feb 2006
Location: Oklahoma
Distribution: Debian Sid and Etch
Posts: 423

Rep: Reputation: 30
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 02:23 AM
Why after start of a command the invitation for input next command has not appeared. ukrainet Linux - General 3 06-24-2005 08:16 AM
Redirecting output to a command-line argument of another command madiyaan Linux - Newbie 1 02-19-2005 04:35 PM
Key stroke/command to shut down x and go into the command prompt screen? Fear58 Linux - General 1 07-14-2004 07:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration