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 ... ...
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.
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
|All times are GMT -5. The time now is 11:39 AM.|