Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kiantech

macrumors regular
Original poster
Jun 9, 2007
236
9
On my server I setup own cloud using a domain I own. Lets say I made it oc.example.com

I have my DNS for my subdomain forward to my home ip address. When I am not on my local network and type oc.example.com everything works. When I try to browse oc.example.com in my browser when I am on the same LAN as my server, nothing works. If I type the ip address of my server I get the default server app. Anyone know why I can't connect to my domain when I am on my local network, but works perfectly when I am remote?
 

alexrmc92

macrumors regular
Feb 7, 2013
218
0
On my server I setup own cloud using a domain I own. Lets say I made it oc.example.com

I have my DNS for my subdomain forward to my home ip address. When I am not on my local network and type oc.example.com everything works. When I try to browse oc.example.com in my browser when I am on the same LAN as my server, nothing works. If I type the ip address of my server I get the default server app. Anyone know why I can't connect to my domain when I am on my local network, but works perfectly when I am remote?

This is called NAT loopback and most household routers do not support it. Basically your trying to contact your website's public ip address from the same ip address (because you are on the same network). I hope that makes sense.

Anyways the quickest fix is to setup the OS X DNS server on your mac server and point oc.example.com to your mac server local ip address. Make sure all of your local computers are set to use it for dns.
 

kiantech

macrumors regular
Original poster
Jun 9, 2007
236
9
This is called NAT loopback and most household routers do not support it. Basically your trying to contact your website's public ip address from the same ip address (because you are on the same network). I hope that makes sense.

Anyways the quickest fix is to setup the OS X DNS server on your mac server and point oc.example.com to your mac server local ip address. Make sure all of your local computers are set to use it for dns.

Okay I got it to work. Few things I did.

I set my OSX Server to have dns enabled. Under forwarding servers I put opendns.

Then under host names I put my oc.example.com with the local 192 adress of the web server.

Finally on my computer I put my server as my main dns, open dns as backup.

Boom everything works now.

Thanks for steering me in to the correct logic of what was going on.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.