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?

link|improve this question
feedback

1 Answer

up vote 2 down vote accepted

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 ?

link|improve this answer
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
feedback

Your Answer

 
or
required, but never shown

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