I've bumped into the weirdest problem with dynamic DNS and Raspberry Pi.

Here's my setup:

  • Raspberry Pi has IP address 172.16.1.xxx
  • Raspberry Pi is in DMZ
  • I'm using DynDNS to point whatever.dyndns.org at my Raspberry Pi.

Here's where things break down. If phone is on the same network as the Raspberry Pi and I go to 172.16.1.xxx, boom! the Raspberry Pi pops up. If I try going to whatever.dyndns.org while I'm on the same LAN as the Raspberry Pi, the browser says website not found.

Then, if I connect to cellular data and go to whatever.dyndns.org, the Raspberry Pi responds as if nothing was wrong. If I try the same from work or the WiFi at the coffee shop or from a friend's place, everything works OK.

Here's what's bothering me. Why can I not access whatever.dyndns.org from inside the LAN but I can from outside? What am I doing wrong here?

EDIT: My router/gateway is an Actiontec V1000H provided by my ISP. I have to use this since I'm on a fibre optic connection. (I asked them for a DSL connection over twisted pair. They said all new connections are FO.)

UPDATE: So it is my router. It does not support NAT loopback, and it does not support bridged setup. I'm going to investigate if I can use an off-the-shelf router. Looks unlikely. :(

  • is your connection to the pi NATed? if so, you can try to enable the NAT loopback... – Gotschi Feb 18 '14 at 0:42
  • How do I add a NAT loopback? I think I know what you are saying, however, I am not an expert at iptables. Thank you. – G Ragib Feb 18 '14 at 0:48
  • you normally set this on your router (note: not every router supports nat loopback), please update your question and give more details of your setup – Gotschi Feb 18 '14 at 0:58
  • So I'm using an ISP-provided Actiontec V1000H. Gathering everything I've read on other forums, this "award winning" router doesn't support NAT loopback. I'm going to check if I can use an off-the-shelf router that's more capable with my fibre optic setup. As it stands right now, I'm pretty much S.O.L. Thanks all. – G Ragib Feb 18 '14 at 1:23

After much digging, I found out that the issue lies in the fact that my router does not support NAT loopback. This is not a problem with the configuration of the Raspberry Pi.


So I fixed my problem using a hack.

I got a new router, flashed OpenWRT, set it in bridge mode and configured it to return the internal IP address of the Raspberry Pi (172.16.1.xxx) when a device inside the LAN does a DNS lookup for whatever.dyndns.org. I disabled the WiFi hotspot on my ISP's router and I use the OpenWRT router as the WiFi hotspot.

The net effect is that DNS lookup for whatever.dyndns.org returns

  • 172.16.1.xxx inside the LAN (since everything in my home except the Raspberry Pi connects to the net via WiFi)
  • my public IP address when outside the LAN
| improve this answer | |
  • OW man, I looking to do EXACTLY that on my home.. I want my pictures to load from the raspi at LAN speed. Whats the name I should be looking for in my router configuration? NAT loopback? I can set NAT (I use that for the webserver) but didn't know I can tweak the DNS – javirs Feb 20 '14 at 7:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.