I'm inexperienced with Linux servers but I've done okay so far - basically I want this machine to dish out IP addresses via DHCP (done) and then I also want it to act as a DNS server that simply sends you to a certain IP address when you enter a specific URL. That IP will be local, on the same subnet. I've done plenty of research but can't find anything specific to my issue.

I'm using isc-dhcp-server in combination with dnsmasq (could not get the DHCP feature on it to work - maybe using just that would be a better option?) and the DHCP is giving machines the correct DNS address too - the same as the DHCP server of course. The output when trying to use nslookup xyz.com on a Windows client that's been given a DHCP address from the server, is Server: UnKnown although the Address is correct, and something about a non-existent domain, followed by the requests to the DNS server timing out. Sorry I can't give much more detail, but I don't know where else to turn but to ask online. Settings below are a result of trying to follow a few different tutorials, guides, and my own experience. Censored where needed.



dnsmasq.hosts www.xyz.com xyz.com

hosts        localhost        CExxx.xxx.local CExxx     xyztestsite
#ipv6 stuff below


default-lease-time 600;
max-lease-time 7200;
option subnet-mask;
option broadcast-address;
option routers #this ip does not actually exist
option domain-name-servers;
option domain-name "ubuntuserv.local";
subnet netmask {

Thanks very much for any help my way.

  • Do you mean catching only specific URLs? Some undesirable.domain.example? Or do you mean to redirect all HTTP traffic of the users? – Incnis Mrsi Sep 12 '15 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.