Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    SquidGuard Filter Whitelist: Domains work, URLs and RegExp Don't

    Cache/Proxy
    1
    1
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      aknisly
      last edited by

      I've successfully learned and configured pfSense/Squid/Squid Guard enough to get whitelisting to work from the Target Categories>Domain List. But I'm not understanding why the URL list or the Regular Expression list aren't working in the same way. As an easy example, I've entered this url into the URL List: docs.netgate.com/pfsense/en/latest/packages/cache-proxy/squidguard.html and it gets blocked. When I enter docs.netgate.com into the Domain List, this and all other pages come through.

      Here is my config:

      # ============================================================
      # SquidGuard configuration file
      # This file generated automaticly with SquidGuard configurator
      # (C)2006 Serg Dvoriancev
      # email: dv_serg@mail.ru
      # ============================================================
      
      logdir /var/squidGuard/log
      dbhome /var/db/squidGuard
      
      # 
      dest Whitelist {
      	domainlist Whitelist/domains
      	urllist Whitelist/urls
      	log block.log
      }
      
      # 
      rew safesearch {
      	s@(google..*/search?.*q=.*)@&safe=active@i
      	s@(google..*/images.*q=.*)@&safe=active@i
      	s@(google..*/groups.*q=.*)@&safe=active@i
      	s@(google..*/news.*q=.*)@&safe=active@i
      	s@(yandex..*/yandsearch?.*text=.*)@&fyandex=1@i
      	s@(search.yahoo..*/search.*p=.*)@&vm=r&v=1@i
      	s@(search.live..*/.*q=.*)@&adlt=strict@i
      	s@(search.msn..*/.*q=.*)@&adlt=strict@i
      	s@(.bing..*/.*q=.*)@&adlt=strict@i
      	s@(duckduckgo..*/?.*q=.*)@&kp=1@i
      	s@(rambler..*/?.*query=.*)@&adult=family@i
      	s@(qwant..*/?.*q=.*)@&s=2@i
      	s@(ecosia..*/search.*q=.*)@&safesearch=2@i
      	s@(onesearch..*/yhs/search.*)@&vm=r@i
      	log block.log
      }
      
      # 
      acl  {
      	# 
      	default  {
      		pass Whitelist none
      		redirect https://192.168.20.2:443/sgerror.php?url=403%20&a=%a&n=%n&i=%i&s=%s&t=%t&u=%u
      		log block.log
      	}
      }
      

      And here is part of the block log after attempting to load this page:
      11322a15-9fa7-454f-9112-c81bcf269b5d-image.png

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.