Mac – Access to Local Server with external domain name

Jenkinsmacnetworking

I have created a simple server in my office LAN. The server can be reached from outside the network: I have configured NAT on pppoe interface to route correctly the packets into the correct local IP.

The problem is that inside the network I have to use a local address (192.168.1.X), (NAT from inside the network does not work) and remember to use the remote address (myCustomDomain.com) when I'm outside the network.

I'd like to always use my domain name to reach the server, the server will have a lot of services and I don't want to have duplicated alias for each one.

I'm a Mac developer and I need to use Jenkins for some compilations jobs, for this reason both the server and my working environment runs on Mac OS X 10.8.

Best Answer

You need to set up an internal DNS server that replies for that domain in your LAN. You can set up BIND to do that, or any number of other programs will do the same thing. When you're in the LAN, set up DHCP to give you the internal DNS server as a primary.

Here is some info about setting up the DNS server in OSX server.

Related Topic