Cannot see my webserver using the external IP address
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What kind of local network do you have setup? Is it running through a router with NAT enabled? I am assuming you won't be able to access it with that IP since it is out of the network range for your subnet.
This makes sense then. The external IP will not be available because your PC won't know how to route the data since it whole conception of the network is in the 192.168.0.x range. Is their a particular reason why you need to use the other IP?
Ok, so you know what DNS is right? every computer has an IP and every network has a bunch of IPs? And you understand that routing details how to get network to and from computers in networks?
The reason why you can't see the page internally is because you don't have a route to it, your network and the internet don't have information on how to get to the external address of your web site. The reason you can see google is because DNS servers from your ISP and routers of your ISP have information on how to translate www.google.com into the IP of google, route the traffic, and bring the page back.
What you DO have in your internal network, is a route to the web page on the internal IP. What your friend has, is a route and/or a DNS entry to the external IP.
So in short, two things determine if you can see a web page. A router contains the route to the page, and a DNS server has a name<->number translation. You are missing one or the other in any case where you can't see the page.
When you send the request it goes from your box on the lan to the router which then sends the request out using the wan ip address allocated by the isp. Since the ip address of the request and the response are the same the system gets confused and says that it cannot be found.
This can be overcome using network loopback (I don't know how to do this so don't ask) or by finding a public proxy server or using a different ip address to make the request. A public proxy server is one which redirects requests form one ip and makes it look like it is coming its coming from the proxy server thereby allowing the request. I have used this method and it works well. Make sure that the proxy server allows you to do this! You can also use a dial-up connection because this will come from a different ip.
Edit: You'll find a list of proxy servers here . Use the anonymous ones on port 80. To do this with Mozilla/FireFox go to Edit -> Preferences -> Connection - Manual proxy configuration and enter the address and use port 80.
where 192.168.1.x would be your internal IP address of your web server, can be any class A,B or C and www.yourdomain.com would be the FQDN. So whenever you type www.yourdomain.com or www into your browser url, it resolves to the 192.168.1.x where your web server would be
My router (Linksys WRT54G) adds a loopback route for the public IP address and does not suffer from this problem. Any machine on my LAN can browse the public-facing web server using my router's public IP address or dyndns.org hostname.
My router (Linksys WRT54G) adds a loopback route for the public IP address and does not suffer from this problem. Any machine on my LAN can browse the public-facing web server using my router's public IP address or dyndns.org hostname.
i had a linksys router at my old house that did the same thing. i've since used both a microsoft wireless router and a different linksys cable modem/gateway/router, and neither of them allows that by default. i asked why, and was told that it's a design decision: that computers inside a LAN should only communicate with the server inside the LAN. routing traffic through the gateway to the external interface and then back in to the server creates extra complexity and sucks up extra system resources.
while this is probably more applicable to large networks, i think it's still good policy to be efficient whenever possible.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.