0

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.

slm
  • 7,615
  • 16
  • 56
  • 76
Giuseppe
  • 103
  • 1
  • 4

2 Answers2

3

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.

NickW
  • 10,263
  • 1
  • 20
  • 27
0

If you don't have an internal dns server on your private network you can edit the host file on your mac:

sudo vi /etc/hosts

replace the ip below with your webserver ip

11.11.11.11 myCustomDomain.com

Or if you router provides dns you could add a static hostname there.

Here are the instructions for linksys routers as an example