Wardriving Ubuntu & /etc/resolv.conf

Joe Potter jpotter1034 at cfl.rr.com
Sat Mar 12 12:59:28 UTC 2005


Hans Poppe wrote:
> Hi, I recently found a pub/cafe near where I live where there is an
> unsecured WiFi that I've been using for some time. In Norway, where I live,
> this is not illegal. However a problem has arisen. Lately another neighbour
> to the cafe has set up another WiFi base station which is overpowering the
> one I used. The new one is also unsecured (ie no encryption, no ESSID), but
> the DHCP server on the new router is set to renew leases every 13 seconds,
> and at that time the /etc/resolv.conf is overwritten with a new file,
> listing only the new routers IP address (10.0.0.1) as DNS. It doesn't relay
> from my machine. So my question is how can I prevent the overwriting
> of /etc/resolv.conf? I tried to edit it (as root), but if I cat the file a 
> immedeatly after exiting vi, the file is changed, but a few seconds later
> if I cat it again it is set back to what it was. I then tried to chown and
> chmod the file in several ways, but it didn't work either. Is there a way
> to work around this? How can I configure my laptop running Ubuntu with
> 2.6.8 kernel to find and report more than the most powerful (I think this
> is what it's doing) and let me choose which to connect to? I'm using
> KWiFimanager, but it only shows one network. The reason why I think there
> is a new network is because the signal strength has increased from 35-40%
> to 80-90% sitting at the same table in the cafe :-)
> I suppose I need software, but what to choose on this platform?
> Thanks for any ideas.
> Hans
> 
> 


http://www.die.net/doc/linux/man/man1/chattr.1.html

You need to look at the chattr and lsattr commands. You set the 
/etc/resolv.conf file so that it will not be changed at all. Then the 
file will stay as you want it; till you change the file attribute back 
to normal.

Many have done this when running their own name server for a speed up 
over the ISP nameserver.

Good luck.

Regards, Joe




More information about the ubuntu-users mailing list