Hello all, I have a FreeBSD box being used as a router. My network is relatively simple. Just between the internet and my 10.0.0.0/8 network.
Here is my configuration file for pf. I'm a bit stuck I'm not able to get an internet connection but I am able to access the network locally. I'm trying to deny everything unless explicitly allowed.
Please see below
Any help is appreciated. :e
Here is my configuration file for pf. I'm a bit stuck I'm not able to get an internet connection but I am able to access the network locally. I'm trying to deny everything unless explicitly allowed.
Please see below
Code:
# Macros
int_if = 're0' # internal interface
ext_if = 're1' # external interface
internal_network = '10.0.0.0/8' # internal network address
# Options
set block-policy drop # drop packets on block
set skip on lo0 # skip filtering rules on loopback
# Rules
nat on $ext_if inet from ! ($ext_if) to any -> ($ext_if) # NAT translation
#block # By default, block all connections that don't match a rule below.
pass out on $int_if from $int_if to $internal_network # Allow all connections between internal network and the router.
pass in on $int_if proto udp from $internal_network to $int_if port 67 # Allow DHCP on the internal network.
pass in on $int_if proto tcp from $internal_network to $int_if port 22 # Allow SSH on the internal network.
pass in on $int_if proto tcp from $internal_network to $int_if port 53 # Allow DNS on the internal network.
pass in on $int_if proto icmp from $internal_network to $int_if # Allow ICMP on the internal network.
pass out on $ext_if proto udp all
pass out on $ext_if proto tcp all modulate state
pass on $ext_if inet proto icmp all icmp-type 8 code 0
pass in on $ext_if proto udp from any to any port domain
Any help is appreciated. :e