Page 1 of 2

Accessing External IP Inside LAN (NAT Loopback)

Posted: Fri Mar 02, 2012 4:31 am
by ERIC8585
For some reason I cannot access my internal NAS device via my external IP from a computer on my internal LAN connected to my router running Gargoyle.

However I can connect via my external IP from a wireless device on my LAN. FYI the wireless AP is a Dlink DIR-655 router connected via a LAN port to the Gargoyle router. DHCP, etc are turned off on the DIR-655.

Does this behavior make sense to anyone? If so, can you explain to me what's happening?

Re: Accessing External IP Inside LAN

Posted: Fri Mar 02, 2012 8:27 pm
by DoesItMatter
Your D-Link DIR-655 is connected via LAN to the Gargoyle router.

Is the D-Link in the Gargoyle's DMZ?

If so - you have to check firewall settings on that other computer.

Quickest check - turn off any firewalls - then try accessing
the shared drive again.

Re: Accessing External IP Inside LAN

Posted: Sat Mar 03, 2012 12:24 am
by ERIC8585
DoesItMatter wrote:Your D-Link DIR-655 is connected via LAN to the Gargoyle router.

Is the D-Link in the Gargoyle's DMZ?

If so - you have to check firewall settings on that other computer.

Quickest check - turn off any firewalls - then try accessing
the shared drive again.
No the Dlink isn't in the Gargoyle's DMZ.

What I'm saying is I can't access a local browser based NAS connected to the Gargoyle router via any computer directly connected to the Gargoyle router over my internet IP address, but I can access it (through the internet IP) from wireless devices connected to the DIR-655 (acting strictly as a wireless AP), which is also connected to the Gargoyle router's LAN port. However, I can access the NAS via the local IP on the internal network via any devices.

It doesn't really matter as others outside my network can access the NAS via my external IP because I have port forwarding set up on the Gargoyle router. But sometimes I attempt to connect through my domain name, which is linked to my internet IP, while I'm on my LAN for the sake of not having to reconfigure my iPad apps with a local IP. It just seems like odd behavior to me as it worked fine when my DIR-655 was the router as well as now with the DIR-655 just serving access point duties. Something to do with how NAT works on Gargoyle opposed to Dlink?

Let me know if you don't understand what I'm saying and I'll draw a diagram.

Re: Accessing External IP Inside LAN

Posted: Sat Mar 03, 2012 8:45 am
by pbix
I definitely need a drawing. :geek:

Re: Accessing External IP Inside LAN

Posted: Sat Mar 03, 2012 1:25 pm
by DoesItMatter
DD-WRT has this setting - "Filter WAN NAT Redirection"

I think this is what is happening to you with Gargoyle.

I'm not sure how you change that or even where, but its definitely
going to be some command line work for you with firewall rules.

Re: Accessing External IP Inside LAN

Posted: Sat Mar 03, 2012 2:11 pm
by ERIC8585
DoesItMatter wrote:DD-WRT has this setting - "Filter WAN NAT Redirection"

I think this is what is happening to you with Gargoyle.

I'm not sure how you change that or even where, but its definitely
going to be some command line work for you with firewall rules.
That's probably what's happening. Thanks!

Re: Accessing External IP Inside LAN

Posted: Sun Mar 04, 2012 1:50 am
by ERIC8585
Well I tried something else and now I'm back to square one. I tried connecting to my external (internet) IP with a device connected to the Gargoyle router wireless AP and it worked. But I still can't connect to my external IP through devices connected to the gigabit LAN ports on the Gargoyle router. I don't understand :?

Re: Accessing External IP Inside LAN

Posted: Sun Mar 04, 2012 2:57 pm
by mix
Are you guys talking about NAT loopback?

Re: Accessing External IP Inside LAN

Posted: Sun Mar 04, 2012 3:05 pm
by ERIC8585
Yes. Works with wireless devices on Gargoyle but not wired for some reason.

Re: Accessing External IP Inside LAN

Posted: Sun Mar 04, 2012 3:36 pm
by mix
ERIC8585 wrote:Yes. Works with wireless devices on Gargoyle but not wired for some reason.
Also known as NAT reflection. It seems weird that it will only work on the lan or wifi side, until I think about the fact that these two interfaces are actually bridged in software (probably called br-lan in ifconfig). Honestly, this is one of those more mysterious areas of nat routers that is often implemented incorrectly. I always go out of my way not to rely on it. When I use dns, I make sure that my dns server will always respond to internal clients (that is, ones on my lan, with an ip address in the nat address range, 192.168.0.x or whatever) with an internal ip address. External dns queries get responded too with the public ip address of the router. As long as whatever computer/device you are trying to access has a static internal ip address, this is not an issue.