A web server inside the office network which is accessed by staff internally and the internal DNS resolves web.company.com to the server's LAN IP.

Publicly, company.com nameservers belong to their party hosting company where the main company website is hosted and it does not have web.company.com record.

Now if the web.company.com should also be accessible from outside, it is okay to expose our LAN IP in the A record so that only staff with VPN can access; or should web.company.com resolve to the office network external address and use firewall to route to the LAN IP?

  • 1
    When you say internal IP, are you referring to a private address or a routable address that is not advertised?
    – ultrajohn
    Commented Jan 21, 2015 at 9:44
  • Sorry I am not very clear what is an (un)advertised/routable address. Maybe share a link for me to read? What I thinking is a LAN IP like web.company.com. IN A on the third party DNS, thus "exposing" the LAN IP.
    – Jake
    Commented Jan 21, 2015 at 10:31
  • Your sample IP is a private address so I don't think exposing it through the DNS will work. However, you can achieve this at the web server level such as in Apache by using its VirtualHost concept. More information can be found from here: superuser.com/questions/600420/…
    – ultrajohn
    Commented Jan 21, 2015 at 12:42
  • What do you "don't think will work"?
    – Jake
    Commented Jan 21, 2015 at 13:00
  • Do you have a Local DNS Server? If you have, I strongly recommend you setting the record in there.
    – fgpr0x
    Commented Jan 21, 2015 at 13:09

3 Answers 3


Including private IPs in public DNS entries is not ideal because it provides a would be attacker with:

  • An indication of what your internal subnets are;
  • Actual IP addresses for specific internal resource(s).

Neither are likely to result in a direct compromise, but can assist with an attack or can facilitate onward compromise.

Generally speaking leaking information about your internal network and resources hosted on it should be avoided.

From your question it seems the internal resources are only intended for VPN users so it might be more appropriate to have an internal DNS which VPN users can access this avoids any issues with including 'sensitive' information in public DNS records.


There is another risk using private / LAN IP addresses for public DNS records.

Suppose you have a laptop user in your LAN, who uses web.company.com (which resolves for example to

If this user connects his laptop to another network (wifi!), and tries to use web.company.com, it will resolve to using the public DNS entry. It may be possible that the IP address corresponds to a machine on this foreign network. The laptop will then send information to this machine, which may even include plain text credentials, cookies or other data.

It may even be possible to setup a sort of honeypot using some detailed knowledge of the LAN.


Your description of the architecture and the proposed architecture is a little confusing. If you publish the DNS of an internal IP address on your public-facing DNS then only people on your network or on your VPN are going to be able to reach it. An external party will be able to look up web.company.com and get back but the network they are on won't be able to route traffic to that server. The traffic might go to a but it won't be the right server. The network they're on might have a server using that same IP address.

You might be better off using a real IP for the internal server and having your router direct the traffic back to the internal server (with the appropriate access restrictions). Talk to your network team.

In terms of security it's not great to expose internal IPs externally but it's not horrible. It might assist someone who's trying to attack internal resources from outside by exploiting a vulnerable border service. Okay for a regular commercial network, not okay for protecting my pacemaker or launch codes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .