I have tried using pf for restricting certain IP addresses from accessing certain website with the following.
I am running squid transparent and nat and get inconsistant results. Sometimes it works, other times it seems to let all traffic through. Some browsers will work and others block sites that are in the whitelist. I reset the whitelist table every hour with a cron job but I have seen issues with websites that always have the same IP address.
This has made me question whether I am using the right tool for the job. Would it be more efficient using squid or should I do more research on pf.
Thanks in advance.
Code:
pass in on $ext_if proto tcp from <whitelist> port {80, 443} to any keep state
block drop in quick on $ext_if proto tcp from any port {80, 443} to <whitelistclients>
pass in quick on $ext_if proto tcp from any to any port {80, 443}
I am running squid transparent and nat and get inconsistant results. Sometimes it works, other times it seems to let all traffic through. Some browsers will work and others block sites that are in the whitelist. I reset the whitelist table every hour with a cron job but I have seen issues with websites that always have the same IP address.
This has made me question whether I am using the right tool for the job. Would it be more efficient using squid or should I do more research on pf.
Thanks in advance.