LowEndBox - Cheap VPS, Hosting and Dedicated Server Deals

I'm an Internet Bad Boy: How I Violate RFC1918 Every Day And Why You May Find It Convenient To Do So, Too

Internet Bad BoyIf you have even a passing familiarity with networking. you’re aware that there are certain network ranges that are reserved for private use.

With IPv4, those are:

  • 10.* (an entire /8 for you to use!)
  • 172.168.*
  • 192.168.*

These are nonroutable addresses and you will never find a public Internet service at these addresses.  Typically, organizations will have both public and private.  For example, a company might buy an IPv4 address block and host their web, mail, and other services on it.  But it would be a waste of money to buy public IPs for all their internal computers (such as their database services, individual employees’ workstations, accounting services, etc.) which don’t need to be routed to the Internet.  An organization can build a vast, complex internal network purely on 10.x.

My Confession

At home, I don’t need an /8 for my modest computing environment.  I use 192.168.* addresses.  Naturally, I’d like to have DNS so I can talk to fileshare.example.com instead of 192.168.1.20.  (Of course, I am not using example.com – I use a domain I own).

The right way to do this is to have an internal DNS server.  Or actually, a recursive server that is authoritative for my internal network but forwards other requests to a public DNS server.

But this is rather a bit of work.  Some years ago, I thought…why not just put my internal addresses on my registrar’s DNS service?  

That Is Forbidden!

RFC1918, which defines private networking, says (emphasis mine):

   Because private addresses have no global meaning, routing information
   about private networks shall not be propagated on inter-enterprise
   links, and packets with private source or destination addresses
   should not be forwarded across such links. Routers in networks not
   using private address space, especially those of Internet service
   providers, are expected to be configured to reject (filter out)
   routing information about private networks. If such a router receives
   such information the rejection shall not be treated as a routing
   protocol error.

   Indirect references to such addresses should be contained within the
   enterprise. Prominent examples of such references are DNS Resource
   Records and other information referring to internal private
   addresses. In particular, Internet service providers should take
   measures to prevent such leakage.

In other words, a public DNS server should never return a 192.168.* address.

But It Works

In my experience, this requirement is widely ignored.  Creating private-address DNS records on a public DNS server works just fine, and has for at least 15 years.

I also freely intermix DNS records.  So if you query www.example.com, you’ll get a public IP for a LowEnd VPS I run.  But if you query fileshare.example.com, you’ll get a 192.168.*.

So if you don’t feel like running a DNS server that properly splits public/private, and don’t mind be chastened by the RFC1918 authors, you can do the same.

 

 

 

 

No Comments

    Leave a Reply

    Some notes on commenting on LowEndBox:

    • Do not use LowEndBox for support issues. Go to your hosting provider and issue a ticket there. Coming here saying "my VPS is down, what do I do?!" will only have your comments removed.
    • Akismet is used for spam detection. Some comments may be held temporarily for manual approval.
    • Use <pre>...</pre> to quote the output from your terminal/console, or consider using a pastebin service.

    Your email address will not be published. Required fields are marked *