Configuring Verizon FiOS router for NAT loopback

Standard
Share

I run my own server at home, and host my site on it.  The WHS software provides a subdomain on the homeserver.com domain.  Browsing this domain from within my network has always caused problems – essentially, my browser ends up showing me my router’s configuration page.

Why is this happening?  Because DNS lookup of my domain returns my public IP, which takes me to my router.  If I were outside of my network looking in, my router would happily forward port 80 requests to the private IP address of my server.  But without proper configuration, port forwarding only works for packets coming into my network.  Packets originating inside my network don’t get processed by port forwarding rules, thus leaving me at my router’s configuration page.

The workaround for this problem is an easy one – I simply edit my computer’s hosts file (Windows 7 hides this file at C:\Windows\System32\drivers\etc\hosts) and add an entry for my homeserver.com subdomain with the private IP address of my server.  While a bit hack-ish, this was a perfectly suitable solution for me – up until now.

With the introduction of jkshay.com (and it’s corresponding mail server), I needed a real fix.  You see, my Android powered smartphone was unable to retrieve e-mail from jkshay.com while I was connected to my home network.  Of course, I could simply disconnect from my wireless network, but I didn’t want to have to do that just to check my e-mail.  If I rooted my phone, I could probably perform the same hack on the hosts file – but my phone isn’t rooted.  I needed a way to be able to access jkshay.com from within my network without editing a hosts file.


verizon_fios_image_1Poking around my router’s interface, I searched for DNS settings.  I found what I needed under the Advanced section.

verizon_fios_image_2

After confirming that I wanted to proceed, I clicked the DNS Server section,..

verizon_fios_image_3

and added an entry for jkshay.com pointing to my router’s private IP address.

I saved my changes, ensured that my computer was receiving its DNS settings from the router, removed my hosts file entry, and voila! – I could now browse to jkshay.com from within my network successfully!

A quick check of my mail on my smartphone confirmed that I had successfully configured NAT loopback on my FiOS router.

13 thoughts on “Configuring Verizon FiOS router for NAT loopback

  1. James Smith

    My brother recommended I would possibly like this blog. This post actually made my day. You can not believe just how so much time I had spent for this information! Thank you!

    • Howard-

      My router is the Actiontec MI424WR-GEN2, rev F. I’ve been unable to locate any documentation on the interface provided with your router.

      If it does support the feature, it will most likely be under a section labeled “DNS”. You enter the machine name, the local IP address for the machine, and ensure that your computer is set to obtain its DNS resolution from the router. Hope this helps.

  2. Joe

    This worked for me as well… thanks!

    I have a secondary router setup in the DMZ on a different subnet, but I still had to add a DNS entry on the primary router (192.168.1.1) using the IP address of the server (192.168.2.2) which is assigned by the secondary router’s DHCP.

  3. Jeremy Schatten

    This is NOT NAT Loopback. This is split DNS. NAT Loopback (or Hairpin Nat) is not performed via name resoluton, but rather via the routing of traffic.

Leave a Reply

Your email address will not be published. Required fields are marked *