Find the answer to your Linux question:
Results 1 to 9 of 9
Hi, I just setup a server using Ubuntu 10.04LTS Desktop edition. I am a novice in these things. I was able to setup the SSH server and it works from ...
  1. #1
    Just Joined!
    Join Date
    Nov 2010
    Posts
    4

    Cannot telnet to 25 but can do it to 22

    Hi,
    I just setup a server using Ubuntu 10.04LTS Desktop edition. I am a novice in these things. I was able to setup the SSH server and it works from outside my LAN quite well. I can telnet to it also with 22. I have then setup an email server. I can do telnet to it from the server itself but from the internet it just times out.
    I did netstat -nlp and it shows that it is listening to port 25. I have port forwarding for 25 enabled on the router.
    I cleaned up all the rules of iptables and iptables -L shows everything is accepted.
    What else should I check or do?

    Any help or guidance would be appreciated. Thanks!

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,114
    Many Internet service providers block port 25.

  3. #3
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    as an aside, why would you want to telnet to an ssh port?

  4. #4
    Just Joined!
    Join Date
    Nov 2010
    Posts
    4
    Hi,
    Thanks for the reply. I talked to the ISP and they said the port was not blocked. I did telenet to SSH just to check whether it was a problem with telnet in general or not. But to SSH it works fine. Just to SMTP port 25 it doesn't work.
    Could it be something to do with the firewall? How can I trace upto where the message is coming?

  5. #5
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    which interface is it bound on? when you ran netstat it didn't say it was listening on 127.0.0.1 interface correct?

    does telnet work inside the network?

  6. #6
    Just Joined!
    Join Date
    Nov 2010
    Posts
    4
    Hi coopstah
    This was the internet connections output part of netstat -nlp


    Code:
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      4118/apache2    
    tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      25339/vsftpd    
    tcp        0      0 192.168.1.2:53          0.0.0.0:*               LISTEN      1412/named      
    tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1412/named      
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1186/sshd       
    tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1983/cupsd      
    tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      1488/postgres   
    tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1892/master     
    tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      1412/named      
    tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      4118/apache2    
    tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN      1715/slapd      
    tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      1387/mysqld     
    tcp6       0      0 :::110                  :::*                    LISTEN      1785/couriertcpd
    tcp6       0      0 :::143                  :::*                    LISTEN      1751/couriertcpd
    tcp6       0      0 :::8080                 :::*                    LISTEN      2074/java       
    tcp6       0      0 :::53                   :::*                    LISTEN      1412/named      
    tcp6       0      0 :::22                   :::*                    LISTEN      1186/sshd       
    tcp6       0      0 ::1:631                 :::*                    LISTEN      1983/cupsd      
    tcp6       0      0 ::1:5432                :::*                    LISTEN      1488/postgres   
    tcp6       0      0 :::25                   :::*                    LISTEN      1892/master     
    tcp6       0      0 ::1:953                 :::*                    LISTEN      1412/named      
    tcp6       0      0 :::993                  :::*                    LISTEN      1771/couriertcpd
    tcp6       0      0 :::995                  :::*                    LISTEN      1805/couriertcpd
    tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN      2074/java       
    tcp6       0      0 :::389                  :::*                    LISTEN      1715/slapd      
    udp        0      0 192.168.1.2:53          0.0.0.0:*                           1412/named      
    udp        0      0 127.0.0.1:53            0.0.0.0:*                           1412/named      
    udp        0      0 0.0.0.0:44134           0.0.0.0:*                           1204/avahi-daemon: 
    udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1204/avahi-daemon: 
    udp        0      0 192.168.1.2:123         0.0.0.0:*                           1959/ntpd       
    udp        0      0 127.0.0.1:123           0.0.0.0:*                           1959/ntpd       
    udp        0      0 0.0.0.0:123             0.0.0.0:*                           1959/ntpd       
    udp6       0      0 :::53                   :::*                                1412/named      
    udp6       0      0 fe80::215:17ff:fee9:123 :::*                                1959/ntpd       
    udp6       0      0 ::1:123                 :::*                                1959/ntpd       
    udp6       0      0 :::123                  :::*                                1959/ntpd
    You are right it does not say 127.0.0.1 What does 127.0.0.1 stand for? How do I correct this?

    I don't have any other computers on the same network so I don't know about the network.

    Thanks for your time.

  7. #7
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    this is the relevant line:
    Code:
    tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1892/master
    it appears to be listening on all interfaces, which is correct

    are you sure you don't have a firewall running on the machine itself blocking it? If you don't have another machine on the network, you can't test whether or not its accessible on the network, which means you can't rule out your network as the issue

    there are 3 major points for it
    ISP blocks the port
    your router isn't configured correctly
    your machine isn't accepting external connections

  8. #8
    Just Joined!
    Join Date
    Jun 2010
    Location
    Darien, IL
    Posts
    36
    What isp do you have? In my area, att dsl blocks port 25 unless you specifically get them to unblock it. Comcast (cable) ALWAYS blocks port 25.

  9. #9
    Just Joined!
    Join Date
    Nov 2010
    Posts
    4
    Hi ladlers.
    This server is in India and the ISP is Airtel. We have contacted the ISP and they say the port is not blocked. Is there any way I can trace upto where the connection is reaching?

    The iptables have an INPUT accept policy for SMTP. How can I check if it is blocking it, there doesn't seem to be any entry in syslog.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...