ASUS RT-N56U: Problem connecting to server in my LAN when I have a public domain name pointing to my static external IP

jeshansen

Reputable
Apr 20, 2014
1
0
4,510
Hello all.

Not too long ago I switched my home router to an ASUS RT-N56U. It been a great choice, except for one minor annoyance I havn't been able to figure out.

Internet connection is provided by my cable modem set up in bridge mode connected to the ASUS RT-56U router. I'm using a static external IP address for the cable modem, and I have my domain name pointing at this external IP. I've set up fort forwarding in the router, so that all the usual 'server ports' (80, 443, 25, ect.) are forwarded to my Synology NAS.

This allows me to access all my files ect. on my NAS just by typing in my domain name in a browser when away from home. I'm also using the NAS as a mail server so I can have an email adress like john@example.com, which works very well when using remote email clients, like a mobile phone outside the home.

What bugs me, is that I cannot access my files and services on the NAS from INSIDE the LAN. If I type in https://example.com I get a 'web page not found' type error. The only way to reach my NAS from inside the LAN is to use it's LAN IP (or https://diskstation). When not on the LAN I can reach the NAS just fine by typing in https://example.com, so something fishy is going on in the router when it tries to route the request. This is also affecting the web mail client runnign on my NAS (RoundCube), since it cannot connect to the mail server running on the NAS. As mentioned, if I'm using a mail client not running on the local network (like a mobile phone or mail2web) I have no problems sending or recieving mail.

Any ideas what might be causing this?

Cheers,
Jes Hansen

 
Solution
This is a well known NAT problem that is resolved only be a special feature called hairpin. Many commercial routers need a special configuration to make this work. I can't say if the default asus code base has any similar feature.

The only other solution I have seen involves use of a internal DNS that resolves the outside host to a internal address. You could also I suppose add them to the host table on your machines so they over ride the external DNS and map the external name to the internal address. It would be a pain if you were to move your machine back and forth from the inside to the outside network.
This is a well known NAT problem that is resolved only be a special feature called hairpin. Many commercial routers need a special configuration to make this work. I can't say if the default asus code base has any similar feature.

The only other solution I have seen involves use of a internal DNS that resolves the outside host to a internal address. You could also I suppose add them to the host table on your machines so they over ride the external DNS and map the external name to the internal address. It would be a pain if you were to move your machine back and forth from the inside to the outside network.
 
Solution