I am running apache2 on Ubuntu 9.10, and I want expose a particular site through port 10045.

My first instinct was to go to ufw and open that port. I've done that, and if I do a list of rules in ufw I get this:

Status: active

To                         Action      From
--                         ------      ----
80/tcp                     ALLOW
443/tcp                    ALLOW       Anywhere
22/tcp                     ALLOW
9418/tcp                   ALLOW       Anywhere
10045/tcp                  ALLOW       Anywhere

But if I run nmap I get this:

Starting Nmap 5.00 ( http://nmap.org ) at 2010-08-02 18:15 BST
Interesting ports on myserver (
Not shown: 996 closed ports
22/tcp   open  ssh
80/tcp   open  http
443/tcp  open  https
9418/tcp open  unknown

And if I check specifically for 10045:

10045/tcp closed unknown

If I try and visit the web site, then I just get a timeout.

What do I have to do to get the port open?


closed means that no service is listening to that port.

Did you check that Apache is actually listening on it ? do netstat -ltpn, see if 10045 is listed as bound by Apache.

Did you add the proper Listen directive to apache configuration ? did you restart it afterwards ?

  • in my ports.conf I have NameVirtualHost and in 000-default in sites-enabled I have <VirtualHost>.... Is that enough? – Matt Ellen Aug 2 '10 at 17:41
  • I see it now! I didn't have Listen 10045 – Matt Ellen Aug 2 '10 at 17:43

I had the same issue. Damn wasted 2 hours. Point is I did fire up vagrant machine with ubuntu 16. Then I did install couchdb 2.1 And try to access couch from outside. ( curl ) Curl said connection refused. But nmap said

(env27) [codertarasvaskiv@lodestone trash]$ nmap -Pn -p 5984
Starting Nmap 7.60 ( https://nmap.org ) at 2018-03-13 12:22 EET
Nmap scan report for
Host is up (0.00052s latency).
5984/tcp closed couchdb
Nmap done: 1 IP address (1 host up) scanned in 6.56 seconds

So I did try to open port with ufw help. On ( sudo ufw allow 5984) And restarted ufw service.

ubuntu@client:~$ sudo ufw status
Status: active
To                         Action      From 

--                         ------      ----
22                         ALLOW       Anywhere
5984                       ALLOW       Anywhere
22 (v6)                    ALLOW       Anywhere (v6)
5984 (v6)                  ALLOW       Anywhere (v6)

But this did not help. Nmap said the same "port is closed"

So my solution was: I edited /opt/couchdb/etc/local.ini and changed bind_addres = under [chttp] part. That did work. Nmap now says port is open.

5984/tcp open  couchdb

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.