LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-22-2010, 01:48 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 447

Rep: Reputation: 30
Assign port dedicatedly against an interface !


Dear Friends ,
I am using RHEL 5 . In my Linux Box i have two Lan cards (eth0 and eth1) .

"eth0" is connected with network 192.168.10.0 and "eth1" is connected with network 192.168.11.0 . Both Network are inter connected via routing .

Now I want a situation where , I want to dedicatedly assign some port numbers against a lan card . Like eth0 will be assigned for ssh (22) and eth1 is assigned for telnet (23) . so that ,

when a user connect to 22 port then he/she is connected to the server through eth0 , and when a user connect 23 port then he/she is connected to the server through eth1.

Is it possible to do using iptables or other ?

Waiting for kind reply ... ...
 
Old 04-22-2010, 02:11 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You can easily have telnet (I wouldn't recommend running the telnet server) or ssh blocked on one or the other of the interfaces. Perhaps one network is trusted and the other isn't. It doesn't make sense to allow both networks but use a particular interface because that isn't how the user is connecting.
 
Old 04-22-2010, 02:56 AM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,232

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
For sshd, try ListenAddress option http://www.openbsd.org/cgi-bin/man.c...nfig&sektion=5.
You can also ctrl both sshd and telnetd via TCP Wrappers ie /etc/hosts.allow, hosts.deny
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Assign fixed port to nlockmgr rwcooper Slackware 11 06-15-2010 06:33 AM
how to assign an alternate ip address in bonding interface. cj_cheema Linux - Server 4 07-10-2009 09:15 AM
How do I assign a static IP to an interface on a Fedora Linux box? robcast Linux - Newbie 4 03-18-2008 12:37 PM
Help me cant assign gateway to interface shueib Linux - Networking 10 01-02-2006 11:34 AM


All times are GMT -5. The time now is 03:44 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration