Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

dnsmasq

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
fede



Joined: Thu Sep 01, 2005 4:23 am
Posts: 56

PostPosted: Mon Nov 11, 2013 2:14 am    Post subject: dnsmasq Reply with quote

This is not a really new topic, but I can't search for my old posts, since the search engine says I can't make a search so soon after my previous one, even if there was no previous one... Oh, well.

Anyway, some time ago I asked for help in setting up my laptops to access my mail and file server at home from everywhere, including home, and Neil Bothwick was very nice in pointing me to his article in LXF 170 on setting up a local DNS using dnsmasq. In the article it also says that one should set up dnsmasq as the LAN's DHCP server so it knows where the various computers are, and consequently disable the router's DHCP service.

I dragged my feet for a long time, and finally today I tried to put this idea to work. Unfortunately, once I disabled my router's DHCP service, the server and all other wired machines lost the network and would not connect, even after having been given an IP manually (and, hopefully, having set up dnsmasq, resolv.conf and so on as directed). I could connect with a wireless interface, by setting an IP manually, though. So, now I am back at the original set-up, but I would like to set the dnsmasq set-up to work.

I am a total newbie in terms of networks (I can just do a manual basic ifconfig or iwconfig as my high point), so I suspect I am missing something really simple. The router is a D-Link DIR-601, if that's useful information. Thank you for any suggestion
Back to top
View user's profile Send private message
Dutch_Master
LXF regular


Joined: Tue Mar 27, 2007 2:49 am
Posts: 2430

PostPosted: Mon Nov 11, 2013 3:17 am    Post subject: Reply with quote

Sequence is the key: first shut all computers down cleanly to release their leases, disable the DHCP server in your router, then fire up dnsmasq. Reboot each machine, it should then query the network for a DHCP lease from whatever DHCP server is active, on the subnet specified in the DHCP server config file. My advise would be to do any config on unfamiliar tools via Webmin (provided it has an interface for it, most packages do) to circumvent syntax errors. It won't save you from erroneously entered data though Wink So you still need a basic grasp of how networks actually work. Your first call would therefore be to study that, there's a lot to be found online.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8449
Location: Warrington, UK

PostPosted: Mon Nov 11, 2013 9:33 am    Post subject: Reply with quote

dnsmasq doesn't need much configuration to do basic DHCP, this is what I have

Code:
dhcp-range=192.168.1.128,192.168.1.192
dhcp-option=option:router,192.168.1.42


The first gives the range of DHCP addresses to use and the second tells dnsmasq the address of your router.

There should be a configuration option that is commented out
Code:
conf-dir=/etc/dnsmasq.d

Uncomment this and put your settings in a file in this directory. It makes it much easier to understand than mixing it in with the general config file.

This is particularly clean when you start adding specific addresses for computers, as you can have a separate file for each one.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
fede



Joined: Thu Sep 01, 2005 4:23 am
Posts: 56

PostPosted: Mon Nov 11, 2013 11:29 pm    Post subject: Thanks! Reply with quote

Those were fast replies! Thank you. I'll sit down and be more patient, following your advice Smile
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast