Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an Apache server listening on port 9999. I can verify this by running an SSH tunnel (with port forward of L9595 192.168.5.227:9999) through PuTTY such that from a remote IP I can access this server through the localhost:

localhost:9595

I have a DNS hostname for my dynamic IP that looks like this:

server.hostname.org

And I have a firewall with a rule allowing for traffic through port 9999. My problem is I can't access the server here:

server.hostname.org:9999

The firewall rule should be correct as I modeled it after other rules that successfully allow traffic. I can access the main firewall server through:

https://server.hostname.org

Any help is much appreciated.

share|improve this question
1  
Is Apache httpd bound to the the server's real IP and not just to localhost (127.0.0.1)? –  uSlackr Feb 2 '12 at 21:29
    
Hmm, not sure about that. I will look into it. Thanks. –  nicorellius Feb 2 '12 at 21:51
    
It wasn't, so I edited the httpd-vhosts.conf to include but it's still not working... Not sure. –  nicorellius Feb 2 '12 at 22:58
    
Does netstat -an show it listening on the right address now? –  uSlackr Feb 2 '12 at 23:01
    
Here is the line from the netstat command: tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN –  nicorellius Feb 2 '12 at 23:17
show 1 more comment

2 Answers

I would try:

  1. ping server.hostname.org to check if the DNS is correct (or nslookup server.hostname.org)
  2. modify apache to listen at port 80 (default)
  3. open http://server.hostname.org

If everything works, then change to port 9999 and try to open http://server.hostname.org:9999

share|improve this answer
    
Part of the problem with this idea is that I have something already listening on port 80 (the firewall webGUI); hence, why I need to run this application on another port in the first place. Plus, I already confirmed the server is running and accessible on port 9999; it's just not when using the DNS hostname. –  nicorellius Feb 2 '12 at 23:40
    
I doubt the domain name makes a difference; your results will probably be the same if you manually nslookup to determine your server's IP and use that instead. How is the server hosted? Sounds like you're talking about software firewall on the server itself. But I suspect the traffic is being blocked somewhere between the server and the client. E.g., by the hosting. Open a support ticket with the company you host your server machine with. Ask them to verify whether TCP port 9999 inbound is open to your server. –  Domingo Ignacio Galdos Feb 3 '12 at 9:00
    
The server is hosted by me. I assumed the same as you and that is why I came here. This seems odd that I can open an ssh tunnel and access the server, but not get it from the DNS hostname. Perhaps the firewall is not allowing traffic through after all... –  nicorellius Feb 4 '12 at 6:43
    
what I was saying was, you tried with the ip address and worked, you try with the DNS name, it didnt work. So, before dealing with ipchains, etc, it's faster and easier to check if there is a misconfiguration with the DNS server, thats why I suggested using nslookup just to check where the problem is –  Alejandro Angelico Feb 5 '12 at 23:34
    
I tried what you suggested and still got no connection. I then opened a support ticket with my DNS service. I suspect they don't allow traffic through other than port 80 with their host names (although not sure why they'd do that). We'll see... Thanks for the suggestions. –  nicorellius Feb 8 '12 at 0:01
add comment
up vote 0 down vote accepted

After filing a ticket with the DNS company, I determined that it was not their issue at all. I've been able to successfully configure this to work as desired. Here is what I did:

-Configured Listen port on server -Confirmed firewall rule -Started server

Then it was available at server.hostname.org:9999

Not sure what was happening but it works now...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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