Migrating dnsmasq to iocage jail

spblinux

Cadet
Joined
Jan 2, 2020
Messages
1
To make dnsmasq work as dns server (dhcp and tftp disabled) in iocage jail without vmnet interface use:

interface=em0
except-interface=lo0,em1
bind-interfaces
no-dhcp-interface=em0


(use ifconfig inside iocage jail to display existing interfaces; in my case inside the jail interface em0 is used and lo0, em1, em1 are shown by ifconfig.)

By default dnsmasq binds to all interfaces and tries then to sort out who it should respond. This seems to cause errors with iocage network interface aliasing. Explained in default config file /usr/local/etc/dnsmasq.conf:

Code:
# Configuration file for dnsmasq.
--
# On systems which support it, dnsmasq binds the wildcard address,
# even when it is listening on only some interfaces. It then discards
# requests that it shouldn't reply to. This has the advantage of
# working even when interfaces come and go and change address. If you
# want dnsmasq to really bind only the interfaces it is listening on,
# uncomment this option. About the only time you may need this is when
# running another nameserver on the same machine.
#bind-interfaces


FreeNAS-11.2-U7
 
Top