digital adj. Having digits.     peer n. A comrade; a companion; a fellow; an associate. inmotion    
   
Recent Articles
Securing your Wireless LAN
Wednesday, August 18, 2010
Some tips and things you might not know about your wireless network.
Using Different Subversion Client Versions
Wednesday, August 18, 2010
Handling a Subversion Repository URL Change
Sunday, May 3, 2009
If your repository URL changes, you can use the following command to fix existing snapshots.
vfat Mounts Default to Lowercase Shortnames
Tuesday, April 21, 2009
I want a "this is brain-damage" quote from Linus for this mess.
VirtualBox or VMWare Virtual Machine at Login
Sunday, April 12, 2009
How to start a virtual machine in X when a user logs in.
Dialog Progress Bar Through Pipe
Sunday, April 12, 2009
How to use dialog to display a script progress bar and communicate progress to it through a named pipe.
Mount JFFS2 Image
Saturday, October 25, 2008
Example of how to mount a JFFS2 image using mtdblock.
Ottawa Linux Symposium 2008
Sunday, July 27, 2008
Here are some pictures from the 2008 Linux Symposium.

Some people will die for love, Others will die because they lost it.

Projects-Stop DNSMasq...

Stop DNSMasq From Forwarding Local Hostnames

Saturday, September 25, 2010 by digitalpeer

My ISP, and likely yours, has found it convenient to setup their DNS servers to resolve bogus hostnames to a valid address hoping you're using a web browser so they can give you junk. If you use DNSMasq (or dd-wrt), by default, when you ping "badhostname" it actually works even though that host does not exist. That's because DNSMasq decides it doesn't know who that host is, so it forwards the lookup to your ISP's DNS server. This is extremely annoying and frankly a security risk when using things like ftp. To get around it, make sure your dnsmasq.conf contains the following with the rest of your config:

# Never forward plain names (without a dot or domain part)
domain-needed

# Never forward addresses in the non-routed address spaces.
bogus-priv

# Add local-only domains here, queries in these domains are answered
# from /etc/hosts or DHCP only.
local=/local.lan/

In dd-wrt you can add these into the additional DNSMasq options.
Comment Sunday, January 8, 2012 by  by Andrew
this kills my router and no websites work, seems to be because of the domain-needed line

Submit Comment to This Article
Please post a comment if you have something to add, find something wrong, or would like more information on the topic at hand. Do not use the comment form to contact the author about unrelated concerns!

Name: Email (optional):
Enter verification number here: