telnet: Unable to connect to remote host: Connection refused
hi All,
pls help me, i've a problem with telnet before that sorry if my english bad.. :( i have fedora 6 instaled in my computer and im using sendmail for email for example my ip : 203.191.149.57 this is /etc/hosts file : 127.0.0.1 localhost.localdomain localhost stuckz.cjb.net 203.191.149.57 stuckz.cjb.net localhost im telnet to localhost 25 -> succeed telnet to stuckz.cjb.net 25 -> succeed telnet to 203.191.149.57 25 -> failed with error message telnet: connect to address 203.191.149.57: Connection refused telnet: Unable to connect to remote host: Connection refused pls give me solution thx |
Quote:
Code:
telnet 203.191.149.57 Code:
telnet 203.191.149.57 25 |
telnet: Unable to connect to remote host: Connection refused
telnet 203.191.149.57 25
|
Quote:
In your hosts file, you have "127.0.0.1" and "203.191.149.57" linked to both "stuckz.cjb.net" and "localhost" which is probably why you can get in using those names. Your computer just picks the "127.0.0.1" address since it's the local machine. Hopefully I'm making some sense here... :) To test whether your router or ISP is blocking telnet, Google "Shields UP!" and click on the first result. Click the "Proceed" button and do a common port scan. If port 25 is listed as "Closed" or "Stealth", then your router/ISP is probably blocking telnet. EDIT: Oops, I just remembered that port 25 is SMTP, not telnet (port 23). Now I understand what your trying to do, connect to your SMTP server. The cause is probably the same though, so try my advice and see if it helps. |
I have edit the /etc/hosts being like this :
203.191.149.57 stuckz.cjb.net localhost 127.0.0.1 localhost.localdomain localhost stuckz.cjb.net but still dont work :( |
Quote:
what you just listed here is that you are attempting to telnet back to yourself..... 203.191.149.57 = you I recommend you change the host file to be a bit more "normal" Quote:
Now as stated. The host file should have nothing to do with your issue as your not trying to "telnet hostname" but are using the direct IP. Linux will try to look it up but even in the case if your layout of hosts, it would have referred you to 'attempting stuckz.cjb.net' BASIC IP TROUBLESHOOTING:(hard to explain .. easy to do) 1) First test physical (done, as you can ping other hosts) 2)Set baseline of bad condition by testing application connection to other hosts(done as you can telnet to other hosts and this shows your host is not blocking the application stack) 3) Focus on the host that is reflecting bad condition a) ping that host(if yes then you have physical and basic host communication)If you don't then see if any other host can ping it. b) telnet 'hostname' 'application tcp port' (if yes then firewalls are not an issue) you did this by directly pointing at the TCP port after hostname BUT check other TCP ports on the remote host to validate you can route to the offending host. Try SSH vs Telnet (seeing as anyone using telnet should be taken out and beaten with a wet taco) c) IF you can test the offending host directly. Get to the host physically and 'telnet 127.0.0.1'. If this fails then I would surmise that the local telnet services are down. If they pass, check the firewall or routes on that host for return delivery back to you( ping would likly be quick way) d) IF you can not get into the remote host. See if other hosts can. If other hosts can then the target host has some ACL in the router, firewall, hostaccess.deny, or TCP wrappper setting to stop your IP from gaining access. |
thanks penguinpages for your replies
i've edit my hosts file just like your suggestion and i've found the solution too.. I just edit file /etc/mail/sendmail.mc and give remark, like this: dnl # The following causes sendmail to only listen on the IPv4 loopback address dnl # 127.0.0.1 and not on any other network devices. Remove the loopback dnl # address restriction to accept email from the internet or intranet. dnl # dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl -> remarks and the result... it works guys :) thx |
All times are GMT -5. The time now is 03:40 AM. |