x
all questions login
General DNS & Domains Dyn Email Update Clients

Remote access works fine, but local access doesn't work.

This is kind of a complex problem, but I'll do my best to explain it. At my office I've got a Linksys WRT54G router with a custom OpenWRT firmware installed, forwarding several ports to a Mac Mini Server. The Mini is running services that I need to access both when I'm at the office and when I'm home, via the same address (managed by DynDNS, updated by a script on the router). I can access my DynDNS domain just fine when I'm at home (i.e. when I'm outside the office LAN), but when I'm at the office I can't access it via the DynDNS domain name.

Getting access from outside the office LAN was easy, but I can't figure out how to configure the office's local DNS and firewall to give me identical access from inside the office LAN. I'd really appreciate any insight, I'm about to give up and pay the extra $25 for a static IP from my ISP.

more ▼

asked Jan 20 '10 at 02:22 AM in Default

mikegreen gravatar image

mikegreen
21 1 2 3

(comments are locked)
10|600 characters needed characters left

4 answers: sort voted first

What about to just add an entry to your hosts file on the office client(s) like this:

127.0.0.1    localhost  
192.168.1.17 yourname.dyndns.org

You should be able to call your server by the same name (yourname.dyndns.org) then without problems. (The IP address 192.168.1.17 is an example for the internal IP address of your server.)

more ▼

answered Feb 03 '10 at 06:21 PM

RotBlitz gravatar image

RotBlitz ♦
47.9k 4 14 129

(comments are locked)
10|600 characters needed characters left

try connecting through a proxy

more ▼

answered Mar 22 '10 at 08:29 AM

user-1251 gravatar image

user-1251
1 1 1 1

(comments are locked)
10|600 characters needed characters left

Thanks for the suggestions, I decided to go the DNS route as I already tried doing NAT on the LAN with no joy. I turned on the Mac Mini's DNS server and created a Primary Zone with an A record linking my DynDNS domain to the Mini's LAN IP. Then I created a Reverse DNS record doing the same. I then went into Network Preferences (all computers on this network are Macs) for each computer on the LAN and changed their DNS Server to the IP of the Mini. Local and remote access work beautifully now!

more ▼

answered Jan 20 '10 at 03:50 PM

mikegreen gravatar image

mikegreen
21 1 2 3

Cry Havok gravatar image Cry Havok ♦ Jan 20 '10 at 06:16 PM

Don't forget the tick then ;)

RotBlitz gravatar image RotBlitz ♦ Feb 03 '10 at 06:28 PM

Yes, don't forget the tick...

(comments are locked)
10|600 characters needed characters left

This knowledgebase article covers your problem. In summary, your router isn't configured to support what's known as loopback or NAT reflection.

Fortunately IPTables (which is the firewall package used by OpenWRT) does support this, you'll just have to create a rule to do so. Unfortunately I'm not familiar with OpenWRT (I use DD-WRT) so I can't tell you how it's done, but if you ask on the OpenWRT forum they'll be able to give you the fine detail.

If you don't mind a little "try it and see", instead of just creating your port forwarding rules on your WAN interface, create them on the LAN interface too. You'll have to ensure that you specify the destination as the WAN interface IP (which may mean you need to write a script to update the rule every time the IP changes) or you'll be redirected to your camera when you try to connect to external sites using those ports.

Alternatively, the use of a hosts file, or a local DNS server entry for the hostname, will solve your problem. With your local DNS server simply create a zone myhost.example.com and set the IP of it to the LAN IP of your Mac Mini.

Finally, don't spend the money on a static IP, it won't help you solve this problem and all it'll mean is that you're out of pocket.

If this answer is helpful, please don't forget to apply the tick so we know

more ▼

answered Jan 20 '10 at 07:03 AM

Cry Havok gravatar image

Cry Havok ♦
80.4k 14 28 283

(comments are locked)
10|600 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

© 1998-2013  Dynamic Network Services Inc.  -  Legal Notices  -  Privacy Policy  -  Contacts