Solved Pkg: "No address record" with http ports open (PF)

I'm using a fairly strict PF ruleset on a server and I am having trouble with updating the system. I have port 80 and 443 open (http and https respectively) but I get a "No address record" error when I try to update the repositories. I also have port 21 open in case it used ftp, but it specifically looks at an http URL according to the output of pkg update. Does anyone know what ports I would need to keep the system updated if not these?
 
I managed to allow access to the router for DNS lookups:
pass in quick on $net proto { tcp udp } from 192.168.0.1 to any port domain
pass out quick on $net proto { tcp udp } from any to 192.168.0.1 port domain

But now when I pkg update I get a "No route to host" error.
 
Turns out while debugging the first problem I had removed the 80 and 443 entries in PF. Once I added that and reloaded PF, I can now update the system.
 
Top