I have a FreeBSD box with multiple lan ports. Two LANs are local (a wifi mesh and mains network) and I have two WAN routers - and ADSL and a 4G.
First problem - on the host, I'm not resolving to dnsmasq. dnsmasq DOES resolve names (on my chosen WAN link) for hosts its assigned IPs to via DHCP.
My resolv.conf is:
nameserver 127.0.0.1
nameserver ::1
domain lan
options edns0
And my resolvconf.conf is:
resolv_conf="/dev/null" # prevent updating /etc/resolv.conf
Every attempt to resolve beyond things in /etc/hosts fails, and there is no sign of any query being made against dnsmasq - I enabled logging.
The second issue is that from connected hosts I can see that the gateway is set to the FreeBSD box, and the DNS source - and the DNS is resolving. But I don't get any packet forwarding.
dnsmasq is successfully derving DHCP and DNS to 192.168.13.59
I have in rc.conf:
#ifconfig_re0="DHCP"
ifconfig_re2="inet 192.168.1.2 netmask 255.255.255.0"
ifconfig_re4="inet 192.168.40.2 netmask 255.255.255.0"
ifconfig_re1="inet 192.168.11.2 netmask 255.255.255.0"
ifconfig_re3="inet 192.168.13.2 netmask 255.255.255.0"
#defaultrouter="192.168.1.254"
defaultrouter="192.168.40.1"
dnsmasq_enable="YES"
resolv_enable="NO"
gateway_enable="YES"
I do NOT have pf enabled - do I need it? Its not clear from the handbook section on enabling gateway. Nor do I have any static routes set up. On the host I can ping the gateway and hosts that I know the ip of, so its going through the WAN gateway OK.
First problem - on the host, I'm not resolving to dnsmasq. dnsmasq DOES resolve names (on my chosen WAN link) for hosts its assigned IPs to via DHCP.
My resolv.conf is:
nameserver 127.0.0.1
nameserver ::1
domain lan
options edns0
And my resolvconf.conf is:
resolv_conf="/dev/null" # prevent updating /etc/resolv.conf
Every attempt to resolve beyond things in /etc/hosts fails, and there is no sign of any query being made against dnsmasq - I enabled logging.
The second issue is that from connected hosts I can see that the gateway is set to the FreeBSD box, and the DNS source - and the DNS is resolving. But I don't get any packet forwarding.
dnsmasq is successfully derving DHCP and DNS to 192.168.13.59
I have in rc.conf:
#ifconfig_re0="DHCP"
ifconfig_re2="inet 192.168.1.2 netmask 255.255.255.0"
ifconfig_re4="inet 192.168.40.2 netmask 255.255.255.0"
ifconfig_re1="inet 192.168.11.2 netmask 255.255.255.0"
ifconfig_re3="inet 192.168.13.2 netmask 255.255.255.0"
#defaultrouter="192.168.1.254"
defaultrouter="192.168.40.1"
dnsmasq_enable="YES"
resolv_enable="NO"
gateway_enable="YES"
I do NOT have pf enabled - do I need it? Its not clear from the handbook section on enabling gateway. Nor do I have any static routes set up. On the host I can ping the gateway and hosts that I know the ip of, so its going through the WAN gateway OK.