Stop Waiting For DNS!
I am an impulse domain buyer. I tend to purchase silly names for simple sites that only serve the purpose of an inside joke. The thing about impulse-buying a domain is that DNS propagation generally takes a day or so, and setting up a Web site with a virtual hostname can be delayed while you wait for your Web site address to go "live".
Thankfully, there's a simple solution: the /etc/hosts file. By manually entering the DNS information, you'll get instant access to your new domain. That doesn't mean it will work for the rest of the Internet before DNS propagation, but it means you can set up and test your Web site immediately. Just remember to delete the entry in /etc/hosts after DNS propagates, or you might end up with a stale entry when your novelty Web site goes viral and you have to change your Web host!
The format for /etc/hosts is self-explanatory, but you can add comments by preceding with a # character if desired.
Shawn Powers is an Associate Editor for Linux Journal. You might find him chatting on the IRC channel, or Twitter
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
| Android's Limits | Jun 04, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Linux Systems Administrator
- Introduction to MapReduce with Hadoop on Linux
- Senior Perl Developer
- Technical Support Rep
- Weechat, Irssi's Little Brother
- UX Designer
- One Tail Just Isn't Enough
- Android's Limits
- Replica Watches
2 hours 21 min ago - Reply to comment | Linux Journal
6 hours 31 min ago - on the path to understanding
6 hours 35 min ago - As a fisher,we know that a
1 day 2 hours ago - All I Say Is Worth Share!
1 day 3 hours ago - GeekSays
1 day 3 hours ago - thanks
1 day 6 hours ago - You should consider visiting
1 day 7 hours ago - You should consider visiting
1 day 7 hours ago - You should consider visiting
1 day 7 hours ago



Comments
Domain buyer
I'm also addicted to domain names, thank you for this trick to speed up the launch of my future websites.
really
Trick very useful, thank you but I find that the propagation time is really becoming shorter, right?
really
Trick very useful, thank you but I find that the propagation time is really becoming shorter, right?
/etc/hosts + DNSmasq
If you have a small network and an always-on server, you can easily set up your own DNS server with dnsmasq (http://www.thekelleys.org.uk/dnsmasq/doc.html, or try "apt-get dnsmasq" if you have a Debian-based distro). I got tired of managing a hosts file on each of my home machines. Now I just point my DNS to a local address. And you don't need to wait for changes to propagate - just reload or restart the dnsmasq service.
And "blackhole" sites you don't want to access
Most of my machines with Internet access get at least one entry added to /etc/hosts to block ad.doubleclick.net thus:
127.0.0.1 ad.doubleclick.net
Add any other sites you want ignored with the localhost IP, 127.0.0.1
Of course there are a number of sources on the net from which to download pre-determineds lists with 100's if not 1000's of such blackhole'ed sites for your surfing peace - BinGle for them.
Automate it, even
Here's a shell script I wrote that aggregates a few of the more popular blackhole sites into a single HOSTS file. I also change 127.0.0.1 to 0.0.0.0 because this bypasses the wait for the resolver to fail.
http://www.kubuntuforums.net/showthread.php?56419-Script-to-automate-bui...
And of course, one can use it
And of course, one can use it to access the pirate bay in Belgium, by adding:
178.73.210.219 thepiratebay.se
178.73.210.219 www.thepiratebay.se
178.73.210.219 thepiratebay.org
178.73.210.219 www.thepiratebay.org
178.73.210.219 piratebay.se
178.73.210.219 www.piratebay.se
178.73.210.219 piratebay.org
178.73.210.219 www.piratebay.org
You can use one line various aliases
178.73.210.219 thepiratebay.se www.thepiratebay.se thepiratebay.org www.thepiratebay.org
/etc/hosts FTW
besides using it when waiting for a DNS change to propagate over the Internet, I'm also using /etc/hosts for mapping my local virtual machines to a static local ip and it's great as I can easily access the virtual machines by their code-names.
I also have habbit to give names to my public machines that are not setup in the DNS zone file, so /etc/hosts come handy in this case as well.
take care,
- d