Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm using 2 boxes, let's say A & B, running RedHat 9. From A, I can properly telnet/ ftp/ ssh /ping B but from B, I CAN ping A but CAN NOT telnet/ftp/ssh to it and it's driving me nuts for the past day! If I can just make B telnet to A that will get me going. Yes, both machines are behind a corporate firewall, on local LAN.
I checked thru Q&As of the forums and Web and don't seem to find an answer. So, just speaking of telnet .. here's what I've checked:
0) When I telnet from B to A, here's what it says.. thus A's telnet server not answering
Trying 192.168.0.133...
telnet: Unable to connect to remote host: Connection refused
1) from both, identical outputs of "cat /etc/xinetd.d/telnet"
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
2) I've restarted xinetd of both several times with "service xinetd restart"
3)On both, /etc/host.[allow|deny] files are empty
In A's /etc/host.allow, I've tryed adding this and no luck
ALL: All@127.0.0.1 : ALLOW
ALL: All@192.168.0.0/255.255.255.0 : ALLOW
4) from both, identical outputs of "cat /etc/xinetd.d/services"
service services
{
type = INTERNAL UNLISTED
port = 9098
socket_type = stream
protocol = tcp
wait = no
disable = yes
only_from = 127.0.0.1
}
5) On both, telnet server is installed
rpm -q telnet-server
telnet-server-0.17-25
6) From both, identical outputs of "cat /etc/hosts"
127.0.0.1 localhost.localdomain localhost
7) From both, identical outputs of "/etc/host.conf"
order hosts,bind
6) On A, I checked "netstat -an" if port 23 is enabled
Trying 192.168.0.133...
telnet: Unable to connect to remote host: Connection refused
As i see it this can mean only 2 things.
The xinetd on the machine you try to telnet to is not accepting it or fails to start the telnet process for some reason, but thats not very likely (maybe the log sais something).
The other possibility is that the firewall is in the way. But "192.168.0.133:32786 192.168.0.135:23" this means they are on the same subnet .. so that shouldnt be the case also.
Hmm, did you try to telnet locally ?
One with 127.0.0.1 and one to the own external ip ?
Just something i would try out
Well, you should disable firewall (iptables service) on both machines and then check if they are conencting to each other or not. If everything else is proper, then in most cases, the iptables rules are the offenders...
BTW, I am not too sure if two machines configured as telnet servers can connect to each other or not..so excuse me on that..!
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820
Rep:
The command to shut off iptables in redhat is
service iptables stop
or
/etc/init.d/iptables stop
What I meant by implicating the firewall was that if Iptables is not properly configured, it can prevent telnet access between machines. Successful Internet access is not a sign that iptables is correctly configured.
I would nmap from each of the boxes to the other, both with iptables running, and with it shut down. That will tell you for sure if the firewall is the problem.
Thanks! I only shut off the iptables on the machine that I'm telneting to, A, and I can access it now although it doesn't accept my Login/Passwd which are "root & xxxx" ? don't know why? any idea... I normally loggon to A as root.
That should be nothing to worry about. As the default for telnet should be not to allow root to login. If you need this (highly disrecommended) you need to change /etc/securetty and put in some pty consoles.
But i think for testing the telnet you should add a user on at least on of the boxes and use this one for login. (useradd USERNAME, or even better if your distribution gives you a tool to add users) If you need root-rights after that you can use "su -" to get root.
If you plan on doing root access on the other box often (for administratio and such) you should definitely use ssh instead of telnet.
Oh i nearly forgott ... you sure want to put some holes in your firewall.
In /etc/services you can see all the ports that you need to open for a given service (i.e. ssh, telnet, http ...).
I hope that finally you can this straight and have your fun in the linux world
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.