What's new

LAN -> DHCP Server -> Can't put a Domain Name with '.' in it. (Solution Provided)

Debu

Occasional Visitor
Hi,

I'm trying to setup a home lab and I'm trying to get DNS to resolve a server on my network.
Well, I can't use the dhcp feature because it won't let me use a . character a part of the hostname....whatever.

Maybe there is a better way to do this, in Tomato, I used to be able to just add an IP and Hostname and it would resolve the name and ip easily in the gui.

The thing that is annoying is that this is using dnsmasq in the back so why not just expose that in the gui better and have all these restrictions on names?

So instead I created a small script in /jffs/config
This works with 2 files.

sort_ip.sh
hosts.add

sort_ip.sh
Code:
#!/bin/sh

sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4 hosts.add > hosts.working
mv hosts.working hosts.add
service restart_dnsmasq

hosts.add
(this is an example of the file where you put your hostnames so they resolve when using static IPs.

Code:
192.168.1.1 router
192.168.1.2 family
192.168.1.3 cisco
192.168.1.5 basement

Note: You have to backup jffs every time you make an update to it and also you need to push it up if you mess too much with your firmware and do a factory wipe.

Hope this helps someone.
 
You could have just said "Use a hosts.add file" as per the wiki. No need to complicate matters with an unnecessary script IMHO.
 
Last edited:
Not dismissing the application, but I was scanning the thread, What application in the real world does this have? what purpose?-- application wise.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top