LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Web Server Not Accessible by public IP (https://www.linuxquestions.org/questions/linux-newbie-8/web-server-not-accessible-by-public-ip-4175425141/)

sunveer 09-01-2012 11:54 AM

Web Server Not Accessible by public IP
 
I have forwarded ports 8080 in the router.

I have checked using website yougetsignal.com to see if the port is open, and it is open.

I have installed httpd package and have the following configuration file httpd.conf

Code:

<VirtualHost *:8080>
    ServerAdmin root@desktop.example.com
    DocumentRoot /var/www/html/
    ServerName desktop.example.com
    DirectoryIndex index.html
</VirtualHost>

But when I access the web page using public ip say http://122.162.33.33:8080/index.html, it displays "problem loading page"

Also, the command
Code:

#curl http://122.162.33.33:8080
gives couldn't connect to host.

"Also, I have disabled firewall"

smeezekitty 09-01-2012 12:43 PM

Can you access it as 127.0.0.1:8080 from the machine running the server?
Usually this is a router configuration problem.

Buto 09-01-2012 05:15 PM

ISP possibly
 
If I remember correctly sometime's ISPs will block certain ports. Especially if you just have a residential connection. Try using something other than 8080 and something really random, like 1811.

Ser Olmy 09-01-2012 05:23 PM

It may not be (and usually isn't) possible to access the server from the inside using the public IP. A setup like that is called "hairpin NAT", and requires that the router specifically supports it. Most don't.

It should still be possible to reach the server from the outside using the public IP, and from the inside using the internal IP.

sunveer 09-02-2012 01:14 AM

Quote:

Originally Posted by Ser Olmy (Post 4770235)
It may not be (and usually isn't) possible to access the server from the inside using the public IP. A setup like that is called "hairpin NAT", and requires that the router specifically supports it. Most don't.

It should still be possible to reach the server from the outside using the public IP, and from the inside using the internal IP.

Yes, you are right. I accessed my public IP using another network modem and it worked for 80 port as well as some random port.

smeezekitty 09-02-2012 01:23 AM

Quote:

Originally Posted by Ser Olmy (Post 4770235)
It may not be (and usually isn't) possible to access the server from the inside using the public IP. A setup like that is called "hairpin NAT", and requires that the router specifically supports it. Most don't.

It should still be possible to reach the server from the outside using the public IP, and from the inside using the internal IP.

That's odd. It worked for me.


All times are GMT -5. The time now is 05:05 PM.