[SOLVED] Not able to telnet on ports. Error-Connection refused.
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
Not able to telnet on ports. Error-Connection refused.
Hi Experts,
I am not able to telnet on specified ports--21344,21354 and 21364. I have a colo server and I am able to ping and ssh to it on port 22. When I try telnet, it comes up with the message:-
>>Firewall on the server is turned off using :-
/etc/init.d/iptables stop
/etc/init.d/iptables save
>>Tried to capture packets using tcp dump on the colo server as:-
# tcpdump -i em2 -n src host 10.164.253.216
where 10.164.253.216 is the ip from where I am trying to telnet on my colo server.
>>Asked the Network ENgineer to check the perimetre firewall just to make sure that these ports are opened and he confirmed the same.
Please let me know if I am missing something here. Your quick response will be highly appreciated.
That is your job. That port is not configured by default, I have no any idea what is installed on that host. Probably you have simply forgotten to start your server,
You have to start the service which works on these ports. iptables is like a firewall of your OS which will allow,deny or forward the traffic.here you have stopped the iptables hence it is allowing but the service is not running that is the reason the telnet showing this message.
for eg if ssh runs on port no. 22 and if it is stopped ,the port no. 22 will not be listened.If you do telnet to port 22 same error message will occur.
With the help of netstat command you can check the port is listening or not
I'm not at all certain, but I believe that 'connection refused' means that your telnet attempt was able to try and connect to your server without being blocked by any firewall and without being dropped by iptables and your server said: "i have no process listening on that port so scram!". Before you can telnet to some port on your machine, you need a program of some kind that is set up to listen on that port. Apache (and other web servers) listen on port 80 by default but can be configured to listen on other ports. ssh listens on port 22. Other programs (ftp, mail, etc.) listen on still other ports.
What program do you have configured (if any) to listen on those ports you are talking about?
I have RHEL installed.
cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.2 (Santiago)
Right off, have you contacted Red Hat support?? You are PAYING for RHEL, right??? That entitles you to support and access to their knowledgebase.
Quote:
Most of the documnets I read and researched mainly points in using iptables for opening ports. I have tried that as well, but wihtout any success.
There has to be some other way to make this work. Let me know if anything else is required from my end.
Your quick action will be highly appreciated.
If you need a 'quick' reply, then I suggest you contact Red Hat. We VOLUNTEER our time, so asking us to hurry up is fairly rude. Again, if you don't have a service LISTENING on that port, then nothing will reply, no matter what network/firewall configuration you try. What service is running on port 21344?? What are you trying to connect to, and what results are you expecting?
Also, based on your posting signature, you've got CCIE, CCSP, and RHCE certifications...these are very, VERY basic questions you should already have answers to, or easily be able to figure out, since you're 'certified'.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.