1

I have an Apache web server running at home. To access it anywhere else than home, I have to type in my home IP address.

However when I'm home, I have to use 192.168.1.x to access it and going to my IP will result in a blank page with the title log in.

How can I make it so I can access my web server by going to my IP even locally?

Giacomo1968
  • 58,727
rocky
  • 13

3 Answers3

1

Not easily.

From outside your house you've set up a redirect or forwarded port through your router/modem/firewall. You have to talk to the public IP on that modem to actually to your home network.

When you're inside your home network, that public IP address doesn't exist. The 192.168.x.x. address is a local IP that was assigned to your server by the router (or manually, by you).

In order to use that same IP, you will have to build rules in your router that instruct it to take requests for your public IP, even internally, and route them to the server. Most common household routers do not support this.

Giacomo1968
  • 58,727
music2myear
  • 49,799
0

As far as I know, if you are in a CGNAT pool, it is impossible to access your apache/IIS/ngnix servers from the outside IP, even if you put the server's IP in the DMZ and make the necessary port forwarding settings in your router.

First you have to obtain static ip address from your ISP.

Hakan
  • 181
0

You have to enable to rule on your home router (if It has this feature) to forward traffic from external port to internal port of the PC with Apache Server.

For example, from external port 80 to port 80 of internal IP 192.168.xx. Better assign static ip to internal Web Server (if It has this feature)

In this way, if you call public ip from inside and from outside of yout network you view the same site.