0

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       192.168.1.0/24
443/tcp                    ALLOW       Anywhere
22/tcp                     ALLOW       192.168.1.0/24
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 (192.168.1.65):
Not shown: 996 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
443/tcp  open  https
9418/tcp open  unknown

And if I check specifically for 10045:

PORT      STATE  SERVICE
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?

3

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 192.168.1.65:10045 and in 000-default in sites-enabled I have <VirtualHost 192.168.1.65:10045>.... 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
0

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 192.168.33.10:5984 ) Curl said connection refused. But nmap said

(env27) [codertarasvaskiv@lodestone trash]$ nmap -Pn 192.168.33.10 -p 5984
Starting Nmap 7.60 ( https://nmap.org ) at 2018-03-13 12:22 EET
Nmap scan report for 192.168.33.10
Host is up (0.00052s latency).
PORT     STATE  SERVICE
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 192.168.33.10 ( 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 = 0.0.0.0 under [chttp] part. That did work. Nmap now says port is open.

PORT     STATE SERVICE
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.