I am trying to setup dnsmasq in a jail so I can have a DNS server for local name resolution.
E.g. to see web page of the printer I want to be able to do http://printer in my web browser instead of the IP address.
I am running freenas 9.2. I have setup a standard jail and have done the following setup in the jail (the jail IP is 192.168.1.240):
dnsmasq is running (checked with sockstat and ps):
Internet hosts are still recognized in the jail (e.g. I get an answer from ping www.microsoft.com).
When I do ping printer, the error message "ping: cannot resolve printer: Unknown host" is returned.
I also tried to resolve names outside the jail but in that case I get a timeout.
Can somebody point me in the right direction?
E.g. to see web page of the printer I want to be able to do http://printer in my web browser instead of the IP address.
I am running freenas 9.2. I have setup a standard jail and have done the following setup in the jail (the jail IP is 192.168.1.240):
Code:
pkg install dnsmasq edit /usr/local/etc/dnsmasq.conf This file has the following contents: local=/mydomain.local/ listen-address=192.168.1.240 resolv-file=/etc/resolv.conf # I just want a DNS server, no dhcp no-dhcp-interface= # If you want it to read another file, as well as /etc/hosts, use this. addn-hosts=/etc/banner_add_hosts edit /etc/banner_add_hosts and added the contents: 192.168.1.163 printer 192.168.1.164 freenas edit /etc/rc.conf and added dnsmasq_enable="YES"
dnsmasq is running (checked with sockstat and ps):
Code:
# sockstat -4 -p 53 USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS nobody dnsmasq 72269 3 udp4 192.168.178.240:53 *:* nobody dnsmasq 72269 4 tcp4 192.168.178.240:53 *:*
Internet hosts are still recognized in the jail (e.g. I get an answer from ping www.microsoft.com).
When I do ping printer, the error message "ping: cannot resolve printer: Unknown host" is returned.
I also tried to resolve names outside the jail but in that case I get a timeout.
Can somebody point me in the right direction?