HOSTS File Editor for Mac

This article was written on September 14, 2012 by CyberNet.

Mac hosts file editor

Making changes to the HOSTS file is generally something users either do regularly, or they’ve never touched it. For those of you not familiar with the HOSTS file it is basically a way to override the IP address that a domain/address resolves to. This is a great way to test out DNS changes on your machine before you make any updates at your DNS provider. It’s also a way to access machines in your house without having to use the IP address.

The problem with the HOSTS file is that it can be a pain to make updates to, but there are tools that try to make it easier. We’ve already covered a tool on Windows that will help users make those changes, and today we are talking about a free Mac app called Gas Mask that does the same sort of thing.

The thing I really like about this app is that it lets you maintain multiple hosts files, and you can choose which one you want to be activated. To do that you’ll just need to use the few buttons that are on the toolbar… create a new HOSTS file, and then click the Activate button to make that the active HOSTS file on your machine. By creating new HOSTS files that means at any point down the road you can switch back to the original in just a couple of clicks.

In case you’re wondering I’ve been using this on OS X 10.8 Mountain Lion and it’s been working fine.

Gas Mask HOSTS File Editor (Mac only; Freeware)

Copyright © 2013 CyberNetNews.com

Setup Local/Internal DNS with a DD-WRT Router

This article was written on May 25, 2011 by CyberNet.

I’ve talked about some features of the DD-WRT router before, and one of the things I’ve been playing around with lately is DNSMasq. There’s a good chance you haven’t noticed this setting in DD-WRT because it’s not something most people would ever think to use. Plus DNSMasq can be found in two different areas within DD-WRT since it can be used for both DHCP assignments as well as internal/local DNS management. What I will be focusing on is the local DNS aspect.

When is using DNSMasq useful for controlling DNS? Here are some examples as to why you may want to use it:

  • You have DNS pointing to something that is hosted on your home network and it is also accessible from outside your network. For example, you may have a security camera that has a domain attached to it (e.g. camera.example.com), and it’s accessed from both on and off your network. Using DNSMasq on your router you can make the domain, camera.example.com, point to the internal IP of the camera so that anyone who accesses that camera from within your network won’t have to rely on external DNS getting resolved. You should see at least a slight performance boost that way.
  • You want to override public DNS entries, such as google.com. You can obviously pull off some great pranks by directing traffic to sites like google.com or facebook.com to some custom site you create, but there are other reasons this is legitimately useful. Maybe you are testing a new version of your own website, but want to make sure it will work fine with the live domain. DNSMasq can help you accomplish that.
  • You want to create DNS for a site that is accessible using only a single word, such as intranet. Companies do this kind of thing all the time where an internal-only website can be reached without needing or wanting a publicly-accessible URL.

I know what you may be thinking… why wouldn’t you just update the HOSTS file on your local machine? Well, you could, but not all devices support that feature. By using DNSMasq the DNS change will work for anything connecting to your router, including mobile devices such as phones and tablets.

So what do you have to change in DD-WRT? Here’s what you need to do:

  1. Go to the Services tab once you’ve logged into the administration interface.
  2. Find the section labeled DNSMasq, and make sure the DNSMasq option is enabled.
  3. This is the fun part. In the Additional DNSMasq Options box type out your local DNS configurations in the format of one entry per line:
    • address=/machine_or_domain_name/ip_address – where machine_or_domain_name is what you want to create/change DNS for (e.g. camera.example.com, google.com, intranet) and ip_address is the new IP address you want it to point to.
  4. Apply the settings to DD-WRT, and you should be all set.

This is an example of what your DNSMasq settings may look like:

Ddwrt dnsmasq

If your devices don’t see the changes after they’ve been made you may need to try restarting them since that is often the simplest way to clear the DNS cache.

 

Copyright © 2013 CyberNetNews.com