Portal Home > Knowledgebase > Articles Database > Cannot access my server through a port


Cannot access my server through a port




Posted by pmx625, 03-28-2016, 08:43 AM
Hello, recently I added to iptables (the linux firewall I am using in my ubuntu server) a rule which was supposed to allow incoming traffic through port 993. The rule I used is the one shown below: However when I use the telnet command and run: it tells me the connection is refused by the host (my server). This is not only happening to this port but to other ports I try to open. Am I doing something wrong, running a wrong command, etc? Please help me, if you can. Thank you, Pmx EDIT: After I entered the rule, I ran "iptables-save > /etc/iptables/rules.v4" and rebooted the server.

Posted by Srv24x7, 03-28-2016, 10:19 AM
Hi, Do one thing to test, install CSF, which is fairly easy to manage the iptables. Refer the below link if you want. http://www.digitalocean.com/communit...-csf-on-ubuntu Try things after this. Check if it works.

Posted by NetworkPanda, 03-28-2016, 10:45 AM
Connection refused" does not mean that the port is blocked by the firewall. It means that the port is open, the connection attempt was made successfully but there is no service running on this port (993). There isn't anything that you need to fix with iptables, the 993 port is related to mail services, please check that Exim or your other mail services are started on the server.

Posted by kevincheri, 03-28-2016, 11:11 AM
Do you have a service listening in that port?, 993 is Secure IMAP by default, so do you have any service installed(dovecot)?

Posted by pmx625, 03-28-2016, 06:22 PM
Yes, I do. It is configured to use SSL and therefore listen port 993. However when I run the following command, the port dovecot is using (993) does not appear on the list Dovecot is running along with postfix. I can send emails with postfix and I think dovecot is well configured, so I do not know the reason why there is no service listening on the same port (993). Glad if you could help me on this and thank you for your reply, Pmx

Posted by NetworkPanda, 03-28-2016, 08:00 PM
What is the result of the following commands? service dovecot status and if it reports that it is stopped: service dovecot start

Posted by tech-for-you, 03-29-2016, 04:53 AM
My doubt is that the service is not running for the ports to be opened. Please confirm whether the service runs, if not please restart it.

Posted by pmx625, 03-29-2016, 06:16 AM
Hello, it was stopped when I ran the command: However I started it with the command: After starting dovecot, I ran: and port 993 as well as dovecot didnt show up on the list...

Posted by LnxtecH, 03-30-2016, 03:13 AM
Is dovecot running properly? Run command "ps aux | grep dovecot" or "lsof -i :110" to see if the process is actually running. If dovecot is up, run command "lsof -i :993" to check if it listens on ssl port. If it still doesn't, see if "ssl =" parameter in dovecot.conf is set to 'no'.

Posted by tech-for-you, 04-01-2016, 02:54 AM
Hi, Have you confirmed that the dovecot started after starting it. Can you please issue the command "telnet localhost 110" and "telnet localhost 143" and provide the results.

Posted by super-tech, 04-02-2016, 12:54 AM
The -A present in the firewall rule will append the rule to the end of the list of rules. So if a previous rule drops the packet, the packet is not going to be accepted. Please use -I instead of -A also check if a rule in other tables or in chain PREROUTING drops the packet.

Posted by pmx625, 04-03-2016, 06:12 AM
Hello, I am sorry for not having been active, but the problem is that my ubuntu server was under maintenance and now Im trying to fix SSH on it. As soon as this is done, Ill try the commands you suggested in the previous posts. Thank you, Pmx

Posted by tech-for-you, 04-04-2016, 03:18 AM
No problem. Just let us know when you access the server and tried the commands.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
availability script ?? (Views: 606)