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
hosts.add
(this is an example of the file where you put your hostnames so they resolve when using static IPs.
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.
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.