-1

I am forwarding port 80 on binatone router to my server running apache http server. the configuration works perfect when i access the server from outside of LAN but when i try accessing server from inside of the Same LAN(using public IP) where the server is connected it open's up the binatone configuration interface.

How can i make it to forward port 80 when accessed from within LAN (if this can be done then how will i access the router configuration then) ?

2 Answers 2

1

The most convinient way to reach your goal is to set DNS caching on router (if it is possible) or editing hosts file on your workstation. The idea is you should access your server via LAN IP when you're on LAN because of, as you've mentioned, if you forward 80 port for router's LAN interface, you won't be able to access router's web configuration interface. Just add to your hosts file: 1.2.3.4 your-server.tld where your-server.tld is public accessible name of your server and 1.2.3.4 is its local IP.

0

I guess you are using the hostname to access your server, and in DNS this points at the Binatone's IP address. When the Binatone gets requests from the inside, it doesn't do the port forwarding.

You either need to access your server via an alternative name, IP address, or make the DNS name resolve to the internal IP address. The hosts file change suggested by @slimsuperhero is the simplest way if you are the only person working on the web server. If there are more people then you probably want to do something with internal DNS resolution.

Not the answer you're looking for? Browse other questions tagged .