I have successfully set up a working FreeBSD gateway, but I can't get DNS to work from the gateway itself, when working in the shell.
I'm not sure what's wrong, or what I miss, is DHCP on igb0 overwriting the resolv.conf file?
This is what I have:
/etc/rc.conf
/etc/resolv.conf
/usr/local/etc/pf.conf
I'm not sure what's wrong, or what I miss, is DHCP on igb0 overwriting the resolv.conf file?
This is what I have:
/etc/rc.conf
Code:
gateway_enable="YES"
defaultrouter="192.168.8.100"
ifconfig_igb0="DHCP"
ifconfig_igb1="inet 172.16.1.1 netmask 255.255.255.0"
/etc/resolv.conf
Code:
# Generated by resolvconf
# nameserver 8.8.8.8
# nameserver 8.8.4.4
nameserver 127.0.0.1
options edns0
/usr/local/etc/pf.conf
Code:
### Macros
ext_if="igb0"
int_if="igb1"
int_net="172.16.1.0/24"
### Options
set block-policy drop
set skip on lo0
### Normalization
#scrub in all random-id frag reassemble
### NAT
nat on $ext_if from $int_net to any -> ($ext_if).
### Default Deny
block in all
### Pass local network traffic
pass out quick on $ext_if from any to any
### Pass Internal Traffic Out
pass in quick on $int_if from $int_net to any keep state
pass out quick on $ext_if from $int_net to any keep state
### Pass Gateway Services
pass in on $int_if proto udp from $int_net to port domain keep state
pass in on $int_if proto tcp from $int_net to port domain keep state
### ALLOW PING FROM INSIDE
pass in on $int_if proto icmp all