Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-14-2003, 03:39 AM   #1
LQ Newbie
Registered: Jul 2003
Distribution: Debian
Posts: 5

Rep: Reputation: 0
Question "connection refused" on port 993, when not coming from localhost

I have pretty much a default installation of Redhat 8.0. I'm trying to enable secure imap but I seem to get a "connection refused" whenever I try to come in from anywhere other than localhost. I'm not aware of any firewall settings and my hosts.deny and hosts.allow are empty. I can connect to a bunch of other ports (e.g. 80, 22, 25) but not 993 (or 143; I haven't even bothered with regular imap). A bit more info:

"netstat -nl" produces output including the line
tcp 0 0* LISTEN

$ more /etc/xinetd.d/imaps
# default: off
# description: The IMAPS service allows remote users to access their mail \
# using an IMAP client with SSL support such as Netscape \
# Communicator or fetchmail.
service imaps
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/imapd
log_on_success += HOST DURATION
log_on_failure += HOST

If I go to my Redhat Services Configuration, it shows imaps as being "Currently running at Runlevel 5". I have run "/etc/init.d/xinetd restart" several times....

My /etc/xinetd.conf file is the usual one, specifying 993 as the imaps (tcp) port. I've created ssl certificates, yadda yadda yadda, but I still can't connect to port 993!! :-( Like I said, I *dont* have a firewall.
I had a problem earlier with sendmail, e.g. that sendmail would by default refuse all connections on port 25 that were not coming from localhost. Is there some similar default that I need to disable for port 993?

What to do?
Old 07-14-2003, 04:15 AM   #2
LQ Newbie
Registered: Jul 2003
Distribution: Debian
Posts: 5

Original Poster
Rep: Reputation: 0
Solved; I think.
Apparently I had iptables running. Is this a default with Redhat 8.0? I ran "service iptables stop" and now I can connect to port 993 from outside (and thus get my email)!

Follow-up question: Has disabling iptables now opened some gaping security hole in my system?
(I really don't even know what a "chain" is, so I found "man iptables" rather hard to understand.)

Old 07-14-2003, 06:35 AM   #3
Registered: May 2003
Location: Belgium
Distribution: RedHat 8.0
Posts: 51

Rep: Reputation: 15
You can try the folowing to configure your iptables

this command to see the tables

iptables -L --> to get a list

To insert a rule try
iptables -A INPUT -p tcp --dport 993 -j ACCEPT

To delete a rule use
iptables -D INPUT [rulenumber or rulename]

To save type

iptables-save > /etc/sysconfig/iptables ( for example )

and to restore

iptables-restore /etc/sysconfig/iptables ( for example )

Hope this helps .... Cheers


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
CUPS problem! "localhost:631, connection refused"!!! robbow52 Debian 5 03-04-2009 01:27 PM
port 25 connection refused even from localhost?? Ed1952 Red Hat 2 11-15-2005 08:24 AM
"Connection refused by localhost..." but why? anindyanuri Linux - Networking 2 03-18-2005 11:30 AM
What is "Xlib: connection to ":0.0" refused by server " rack201 Linux - Software 1 02-04-2004 07:49 AM
lp filename yields "cannot open connection to localhost - Connection refused" jjge Linux - General 3 12-28-2003 11:02 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:30 PM.

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