Results 1 to 7 of 7

Thread: Connection refused to port 25

  1. #1

    Connection refused to port 25

    Hello.

    I am having a very strange problem in RH7.2 and 7.3.

    When i issue telnet 192.168.1.1 25 it says "cannot connect ...connection refused".


    Sendmail is running and allows connection on localhost like so: telnet 0 25

    I have selected "No firewall". The problem is still there.

    Hope someone from the forum can help.

    regards
    Asaf

  2. #2
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:Connection refused to port 25

    Welcome!

    Is your telnet service started? You may have it stopped, or not even suppoed to start for that runlevel.

    But, I would personally forget about telnet and use ssh instead. SSH is similar to telnet but much more reliable and secure. I forget the default status for sshd, but a /sbin/service sshd start will enable the service if it is not started. Almost all *NIX setups have ssh clients installed (RH does). For winders puTTY can be quickly located from a google search and is great for connecting from winders to an y sshd server.

  3. #3

    Re:Connection refused to port 25

    what does the file /etc/xinetd.d/telnet look like?

  4. #4
    Junior Member
    Join Date
    Oct 2001
    Posts
    64

    Re:Connection refused to port 25

    It looks to me like asaf is trying to telnet into an smtp server (to send mail etc)... so using ssh or messing with the telnet server probably won't help (I could be horribly wrong ).

    Anyway.... first thing I would do would be check the server is running with "ps ax | grep sendmail" or whatever name it runs under. If that looks ok then check its listening on port 25 with "netstat -l". If that all looks good then it could be the default ipchains or iptables rules your version of RedHat is using.. if the machine is not on the internet you could try flushing all teh rules & then try to connect.

    EDIT~ just noticed you allready tried the no firewall option.

    Just a few ideas... good luck.

    Regards

    eddy

  5. #5

    Re:Connection refused to port 25

    hey eddy!!
    ya you are right that there needs to be a telnet server listening on that port,l i am not sure how to switch ports....

  6. #6
    Junior Member
    Join Date
    Oct 2001
    Posts
    64

    Re:Connection refused to port 25

    Hey Paul,

    I am assuming he is telnetting into the smtp server itself.. so wouldnt need a telnet server running afaik. By default the smtp server should start on 25 so the things I would check are.....

    a) is the service started
    b) is it listening on the port you expect
    c) is it configured to allow you to connect
    d) is something else getting in teh way (ie iptables ruleset)

    I know its kinda vague... but atleast its a start for stuff to check.

    Regards

    eddy

  7. #7
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:Connection refused to port 25

    My apologies, I didnt read : Stupid me.... Anyway, try a /sbin/service smtpd start or /sbin/service smtp start and that should get the service activated, so you can then telnet into it. If ther service is started, but you cannot telnet in -- there may be something else in the way. My first guess would be if the service is bound to the proper port (as in port 25) or if the service is even listening from localhosts loopback adapter. I suppose it wouldnt hurt to portscan your box to see what ports are open and what. Nmap can do that.

Similar Threads

  1. Port Open for Connection or Not
    By honey bee in forum Linux - General Topics
    Replies: 7
    Last Post: 02-08-2007, 11:37 AM
  2. The connection was refused when attempting to contact localh
    By budhead in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 01-04-2005, 08:02 PM
  3. how to stop a connection to a specific UDP/TCP port?
    By aromes in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 03-15-2004, 12:35 AM
  4. vsftpd connection refused!!
    By rhonneil in forum Linux - Hardware, Networking & Security
    Replies: 16
    Last Post: 10-03-2003, 04:03 PM
  5. SWAT Connection to 127.0.0.1:901 refused
    By boxers in forum Linux - Hardware, Networking & Security
    Replies: 56
    Last Post: 09-29-2002, 01:39 PM

Bookmarks

Posting Permissions

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