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

Since I've change my ISP, the current router (ADB P-RG A4202N) won't let me access my web server from within my local network using my remote IP or no-ip host - it redirects me to the router config page. Not just my server PC, but also all other devices that are connected to the same LAN can't access my website using remote IP (internal IP works fine).

However if I visit my webpage from a remote host - everything works fine.

How do I fix this? I want to use my remote IP/host when visiting my website even from within my LAN. For the time being I added a 127.0.0.1 myremoteip rule to the hosts file on my main PC, but it's a workaround I don't want to keep.

My web server is running on Win7, firewall disabled entirely for testing purposes. Port forwarding is working.

share|improve this question

2 Answers 2

I'm assuming this is behind a NATed connection. In that case, you need to enable NAT reflection to allow internal traffic to the external IP address your site resolves to. Most routers don't have this enabled by default and many consumer firewalls don't even support it in their out-of-box firmware. Without this feature, packets from the LAN to your WAN address will not be subject to the NAT rules but filtered by the device.

I had a brief look at the manual for your router, but could not see any mention of this feature. That might mean it isn't supported and an alternative device is required.


It is quite common in these scenarios to instead configure split DNS on your internal network to resolve a different IP address for the site, causing you to communicate directly with the machine without the traffic having to pass through the firewall. This also eliminates any dependence on the connection being up for access to the site to function internally, which is not provided by the NAT reflection approach if a public nameserver must be used to resolve the name in the DNS. The split DNS approach is useful if you have a local resolving nameserver you can configure, but the HOSTS file approach works just as well for a single machine.

share|improve this answer
    
Thank you so much for the explanation. Is there a way to create this split DNS or something similar on the router itself? Configuring every device may not be even possible in my situation. –  Matt Apr 8 at 10:21
    
If you use the gateway as the DNS for the machines on the LAN, then yes, it looks like you can add a custom entry. See pages 106 - 107 of the linked manual, section "DNS server". You'll need to add a rule for externalhostname.tld and configure the internal IP of the box hosting the site. This won't affect external resolution or access, as that won't use your gateway DNS facility. –  Cosmic Ossifrage Apr 8 at 10:25

It seems like that:

Router's autoconfiguration created redirection rule only for external interfaces. You try to connect to the ext ip of the router. Packet appears on its local interface destinated to ext ip. Router sees, that destination ip is belonging to it, it sees, that it have 80 port opened (with router config site), so it passes packet to it's own web server.

Split dns could be a better way, but if it is impossible try this.

There is a very small chance, that disabling router web interface or putting it to other port will solve this problem.

Or configure your router to dnat connections (from local interface to ext ip) to your local web server. Then, for your web server not to answer direct to local client, snat outgoing connections (from local net to local net port 80) to any fake address(lets say 1.2.3.4). So web server will recieve connections from 1.2.3.4 and will answer via router, and router will revert ip back to original. Do not know, if your router supports all the necessary features.

share|improve this answer

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.