I set up the system to function as a router using isc-dhcpd, pf, and was going to use unbound to send encrypted dns requests to Cloudflare's 1.1.1.1, but I can't even get it to work without that yet.
As it is, when I access a website from my pc connected to the router, the websites don't completely load properly. Some search engines work, and some will not.
At first I thought it was 1.1.1.1 (not encrypted for now) that was wrong, but this happens no matter which dns servers I choose. (And they all work fine on my old Linksys router.)
Other than these programs and their configuration files below, this should be a completely vanilla install of FreeBSD 11.2.
My problem may have nothing to do with DNS, I don't know, so any insight or troubleshooting methods would be appreciated. It should be noted that I am completely new to *BSD, as well as building a router.
As it is, when I access a website from my pc connected to the router, the websites don't completely load properly. Some search engines work, and some will not.
At first I thought it was 1.1.1.1 (not encrypted for now) that was wrong, but this happens no matter which dns servers I choose. (And they all work fine on my old Linksys router.)
Other than these programs and their configuration files below, this should be a completely vanilla install of FreeBSD 11.2.
Code:
##resolv.conf
# Generated by resolvconf
# nameserver 192.168.1.1
nameserver 1.1.1.1 1.0.0.1
#options edns0
Code:
##dhcpd.conf
#There is a "sleep 10" at the start of /usr/local/etc/rc.d/isc-dhcpd
#to make sure other things are loaded first.
option domain-name-servers 1.1.1.1, 1.0.0.1;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
}
Code:
##rc.conf
clear_tmp_enable="YES"
syslogd_flags="-ss"
sendmail_enable="NONE"
hostname="squared"
ifconfig_re0="DHCP"
ifconfig_re1="inet 192.168.0.1 netmask 255.255.255.0"
gateway_enable="YES"
#unbound_enable="YES"
sshd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
dhcpd_enable="YES"
dhcpd_ifaces="re1"
pf_enable="YES"
pf_rules="/etc/pf.conf"
Code:
##pf.conf
int_if = "re1"
ext_if = "re0"
#Ping requests
icmp_types = "echoreq"
#Block traffic from these addresses
priv_nets = "{ 127.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, 10.0.0.0/8 }"
set block-policy drop
set loginterface $ext_if
set skip on lo0
scrub in all
nat on $ext_if from $int_if:network to any -> ($ext_if)
#Filter rules
block all
block drop in quick on $ext_if from $priv_nets to any
block drop out quick on $ext_if from any to $priv_nets
pass in inet proto icmp all icmp-type $icmp_types keep state
pass in on $int_if from $int_if:network to any keep state
pass out on $int_if from any to $int_if:network keep state
pass out on $ext_if proto tcp all modulate state flags S/SA
pass out on $ext_if proto { udp, icmp } all keep state
My problem may have nothing to do with DNS, I don't know, so any insight or troubleshooting methods would be appreciated. It should be noted that I am completely new to *BSD, as well as building a router.