LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-23-2011, 01:04 AM   #1
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Rep: Reputation: 15
Question telnet external IP connection refused


Hello

I have CENTOS 5.4 Installed in one machine
and i used Real IP provided by our ISP

My requirements for Mailserver are:

Dovecot
Postfix

everythings done but when i tried to telnet my External IP
it giving me an error of telnet connection refused

but i can able to ssh to my external IP and also i disabled the firewall
but still no luck


when i check the port here is the result

[root@server ~]# netstat -atn |grep LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:620 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 119.92.56.74:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN
tcp 0 0 :::993 :::* LISTEN
tcp 0 0 :::995 :::* LISTEN
tcp 0 0 :::110 :::* LISTEN
tcp 0 0 :::143 :::* LISTEN
tcp 0 0 :::22 :::* LISTEN
tcp 0 0 ::1:953 :::* LISTEN


please does anyone knows this how to fix


thanks is advance

Last edited by cheesewizz; 05-23-2011 at 01:06 AM.
 
Old 05-23-2011, 01:23 AM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Which telnet command did you use. This is important for us to understand what you're trying to achieve.

As it stands now (from your description):
Code:
telnet yourip
There is nothing listening on port 23. You have to start the telnet server; I think it's done from xinetd in Centos.

Comment:
Leaves the question why you need it if you already have SSH. If this is for testing your mail server, you probably want to connect to a port that is used for mail and you definitely don't need to start the telnet server.

Code:
telnet yourip yourport
And yourport is 25 for smtp

Last edited by Wim Sturkenboom; 05-23-2011 at 01:24 AM.
 
Old 05-23-2011, 04:54 AM   #3
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Wim Sturkenboom View Post
Which telnet command did you use. This is important for us to understand what you're trying to achieve.

As it stands now (from your description):
Code:
telnet yourip
There is nothing listening on port 23. You have to start the telnet server; I think it's done from xinetd in Centos.

Comment:
Leaves the question why you need it if you already have SSH. If this is for testing your mail server, you probably want to connect to a port that is used for mail and you definitely don't need to start the telnet server.

Code:
telnet yourip yourport
And yourport is 25 for smtp
Hi Thanks for your reply


I used this command telnet 119.92.56.74 25



and here is the error

elnet 119.92.56.74 25Trying 119.92.56.74...
telnet: connect to address 119.92.56.74: Connection refused
telnet: Unable to connect to remote host

in the xinetd configuration i noticed that the port enabled is 23 for telnet

thanks
 
Old 05-23-2011, 07:40 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
You have stopped iptables so that should not block it. You seem to be listening on port 25, so that's also OK.

Anything in /etc/hosts.deny and /etc/hosts.allow that might block? Not sure if your mailserver supports tcpwrappers.
 
Old 05-23-2011, 01:00 PM   #5
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
some debug ideas for this:
#Which process is running on port 25
fuser 25/tcp

#telnet to your port 25 from localhost. It will tell you if your service is really up.
telnet 127.0.0.1 25

#telnet to your port 25 over ethX and compare with same over localhost. It will tell you if your firewall on your redhat box is configured correctly.
telnet your-eth0-address

#telnet to your external IP address (in the scenario where there is a NAT router in the middle (your ISP)), and compare that to telnet of your ethX interface. It will tell you if you configured your adsl router correctly to forward port 25 traffic.
telnet your-external-ip-address

#to know your external IP address, from your redhat machine, using firefox or other, go to:
http://icanhazip.com/

Have fun!!!
 
Old 05-23-2011, 01:34 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
OK so WHY are you using telnet? You've not said what you want out of it. The telnet client can connect to a telnet server for remote access. This is the proper and largely obsolete use. The other use is to do generic troubleshooting for tcp services, e.g. smtp. Which is it? You can't "log in " with telnet on port25. Well not in the way you may be expecting
 
Old 05-23-2011, 01:44 PM   #7
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,027

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
maybe this will clarify the original poster:
Code:
[schneidz@hyper ~]$ ssh localhost
schneidz@localhost's password: 
Last login: Wed May 11 16:34:42 2011 from 173-114-68-239.pools.spcsdns.net
[schneidz@hyper ~]$ telnet localhost
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
[schneidz@hyper ~]$ telnet localhost 22
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.4

Protocol mismatch.
Connection closed by foreign host.
this shows that my sshd server is running on the default port 22 but my telnetd is not running. not sure what the proper response would be for smtpd.
 
Old 05-23-2011, 07:37 PM   #8
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Wim Sturkenboom View Post
You have stopped iptables so that should not block it. You seem to be listening on port 25, so that's also OK.

Anything in /etc/hosts.deny and /etc/hosts.allow that might block? Not sure if your mailserver supports tcpwrappers.
Hi Thanks for your reply

My firewall is already disabled
i can able to ssh and ping this IP address
My objective is to establish my own mailserver using postfix and dovecot but when i tried to send email in different connection

for example

smtp: 119.92.56.74
pop: 119.92.56.74

username: test
password: test

I setup this in my imail using mac

but i got error in smtp
something that cannot detect my smtp in the internet


please help
Thanks
 
Old 05-23-2011, 07:44 PM   #9
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by schneidz View Post
maybe this will clarify the original poster:
Code:
[schneidz@hyper ~]$ ssh localhost
schneidz@localhost's password: 
Last login: Wed May 11 16:34:42 2011 from 173-114-68-239.pools.spcsdns.net
[schneidz@hyper ~]$ telnet localhost
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
[schneidz@hyper ~]$ telnet localhost 22
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.4

Protocol mismatch.
Connection closed by foreign host.
this shows that my sshd server is running on the default port 22 but my telnetd is not running. not sure what the proper response would be for smtpd.
Thanks for your reply

i used ssh to remote my server
yes i can able to use telnet when i use ssh

for example

MacBook-Pro-15:~ macbookpro$ ssh root@119.92.56.74
root@119.92.56.74's password:
Last login: Mon May 23 04:42:07 2011 from 180.191.41.80
root@server ~]# telnet 119.92.56.74 25
Trying 119.92.56.74...
Connected to server.localhost.com (119.92.56.74).
Escape character is '^]'.
220 server.localhost.com ESMTP Postfix
ehlo 119.92.56.74
250-server.localhost.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

[root@server ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 server.localhost.com ESMTP Postfix
ehlo localhost
250-server.localhost.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250

[root@server ~]# telnet server.localhost.com 25
Trying 119.92.56.74...
Connected to server.localhost.com (119.92.56.74).
Escape character is '^]'.
220 server.localhost.com ESMTP Postfix
ehlo server.localhost.com
250-server.localhost.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

server.localhost.com my hostname which pointed it in 119.92.56.74
 
Old 05-23-2011, 07:52 PM   #10
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
By the way here is my error see my sample screenshot


thanks

please help i need to establish my own mailserver
Attached Thumbnails
Click image for larger version

Name:	Screen shot 2011-05-24 at 7.49.51 AM.png
Views:	42
Size:	60.8 KB
ID:	7094   Click image for larger version

Name:	Screen shot 2011-05-24 at 7.49.28 AM.png
Views:	30
Size:	174.4 KB
ID:	7095  
 
Old 05-23-2011, 08:20 PM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Silly question; any chance this would be blocked at your ISP?

Code:
traceroute -T -p 25 119.92.56.74

Cheers,
Tink

Last edited by Tinkster; 05-23-2011 at 08:23 PM. Reason: *sigh*
 
Old 05-23-2011, 10:46 PM   #12
cheesewizz
Member
 
Registered: Aug 2004
Location: Philippines
Distribution: Centos
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Tinkster View Post
Silly question; any chance this would be blocked at your ISP?

Code:
traceroute -T -p 25 119.92.56.74

Cheers,
Tink

Hi Thanks for your reply

here is the result when using traceroute

macbook-pro-15:~$ traceroute -T -p 25 119.92.56.74
Version 1.4a12+Darwin
Usage: traceroute [-adDeFInrSvx] [-A as_server] [-f first_ttl] [-g gateway] [-i iface]
[-M first_ttl] [-m max_ttl] [-p port] [-P proto] [-q nqueries] [-s src_addr]
[-t tos] [-w waittime] [-z pausemsecs] host [packetlen]
macbook-pro-15:~ $

macbook-pro-15:~ $traceroute -p 25 119.92.56.74
traceroute to 119.92.56.74 (119.92.56.74), 64 hops max, 52 byte packets
1 192.168.254.254 (192.168.254.254) 6.187 ms 3.419 ms 1.869 ms
2 180.191.41.1 (180.191.41.1) 33.528 ms 32.789 ms 32.333 ms
3 120.28.64.57 (120.28.64.57) 32.915 ms 31.663 ms 31.272 ms
4 120.28.0.193 (120.28.0.193) 31.415 ms 31.306 ms 31.983 ms
5 120.28.0.5 (120.28.0.5) 31.829 ms 32.350 ms 32.602 ms
6 120.28.0.10 (120.28.0.10) 41.335 ms 41.363 ms 40.762 ms
7 120.28.0.46 (120.28.0.46) 77.857 ms 99.885 ms 77.751 ms
8 if-3-1.core2.tv2-tokyo.as6453.net (120.29.217.29) 77.541 ms 78.729 ms 78.281 ms
9 if-0-0-0-1705.core1.tv2-tokyo.as6453.net (209.58.61.13) 87.733 ms 78.082 ms 80.236 ms
10 if-5-0-0.core3.hk2-hongkong.as6453.net (116.0.82.1) 126.860 ms 127.409 ms 126.844 ms
11 ix-1-1.core3.hk2-hongkong.as6453.net (116.0.82.38) 267.693 ms 266.636 ms 268.241 ms
12 210.213.131.90.static.pldt.net (210.213.131.90) 275.667 ms 273.940 ms 274.941 ms
13 * * *
14 * * *
15 210.213.128.53.static.pldt.net (210.213.128.53) 281.407 ms 272.871 ms 275.906 ms
16 210.213.133.33.static.pldt.net (210.213.133.33) 273.178 ms 273.252 ms 274.144 ms
17 124.83.5.154.pldt.net (124.83.5.154) 312.524 ms 278.049 ms 297.057 ms
18 119.93.254.69 (119.93.254.69) 275.256 ms 275.726 ms 277.117 ms
19 119.92.57.209.static.pldt.net (119.92.57.209) 298.806 ms 297.014 ms 327.525 ms
20 119.92.56.74.static.pldt.net (119.92.56.74) 297.353 ms 300.668 ms 295.555 ms
macbook-pro-15:~$


no idea about this what does it mean all,


thanks
 
Old 05-24-2011, 02:40 AM   #13
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
It means that it works. As you've. Already proven. I'm a bit confused that people are trying to fix a problem which doesn't need fixing. Probably because its very unclear what the issue actually is. Your client isn't using port 25 but whatever port relates to "rsumook" in you services definition. On that machine. Googling on my phone I have no idea what that relates to but it's blatantly not port 25.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
telnet connection refused Marcusj2 Linux - Networking 22 09-07-2006 11:35 PM
connection refused telnet 25 on FC 4 mmondragon Fedora 1 04-27-2006 04:58 AM
telnet connection refused turbo_acura Linux - Networking 8 11-21-2004 10:07 AM
telnet: Connection refused hnash53 Linux - Networking 2 01-23-2004 03:12 PM
Telnet: Connection Refused Erice60rng Linux - Security 7 01-20-2003 07:15 PM


All times are GMT -5. The time now is 05:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration