I would check to see if you have IPChains or IPTables running and blocking these ports. In order to do this, you can invoke "/etc/init.d/iptables stop". Please note that since netfilter (iptables) is kernel based, this is not actually stopping anything. All it is doing is flushing all the tables/chains out and setting default policy to accept on everything. See if you can access telnet now. If you can, and are using IPTables, then add the following lines to your iptables script (redhat installation will be /etc/sysconfig/iptables).
-A INPUT -p TCP --dport 22 -j ACCEPT
-A OUTPUT -p tcp --sport 22 -j ACCEPT
Please note that that will accept ALL incoming traffic from all sources coming into the machine to port 22, and ALL outgoing traffic from your machien going out from port 22 on your local machine.
This would only be neccesary if the default policy is to reject packets from either chain (eg if you have a default reject policy on the INPUT chain, then you only need the input line, if you have a default reject policy on the OUTPUT chain, then you only need the output line. If you have both, then you need both lines). However first check by "turning off" (even though no such thing happens) iptables.
Main Topics
Browse All Topics





by: The--CaptainPosted on 2003-04-13 at 00:40:05ID: 8321240
netstat -apne
will tell you what ports on which your box is listening - if you don't see 23 (telnet) in there, then you need to play with you xinetd config. If port 23 is listed, but you still have problems, check your /etc/hosts.allow and /etc/hosts.deny files, as well as /var/log/messages and /var/log/secure (you logs may be referenced by different names - it's up to you to find them)
When you say you cannot log in, do you get "connection refused" or similar error messages, or does it just hang?
If it just hangs, have you tried waiting 5-10 minutes? - some services have a real problem with invalid/unreachable DNS entries in resolv.conf, and will hang for quite some time before accepting your connection. If this is the case, check your /etc/resolv.conf file.
Also, remember that tcpdump is your friend - try watching local traffic on port 23 while you are attempting to connect with:
tcpdump -l -n 'port 23'
This may give some indication of the problem.
Also, check your iptables or other filters to be sure you are not blocking such traffic.
Cheers,
-Jon
P.S. I'd personally try to get ssh working and forget about telnet, unless you enjoy sending your authentication in plain text. Let me know how I can help to get your ssh working, if at all possible.