This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Web Protection > "Exceptions" with "Transparent" Mode using default Block policy

Sophos UTM 320 v9.201-23:

Trying to setup rules on the UTM to allow certain trusted websites to have access whether in "Standard" or "Transparent" mode.  The idea being that certain third party partners sites should not require authentication and would work even if an ActiveX (or other plugin) did not know how detect and interact with the UTM as a Proxy (using "Standard' mode).  For some reason I keep running into "The URL you have requested is blocked by Surf Protection" with a Report of "Uncategorized is not allowed" appearing.  I thought "Exceptions" would allow you to ignore the "Uncategorized" block that is defined in the policy.

Web Protection > Web Filtering
Global >
Allowed Networks: Production
Operation Mode: Transparent Mode
Default Authentication: None

Policies >
Categories "Block all content, except as specified below" with each Category option set to "Block" including "Uncategorized websites"

Web Protection > Web Filter Profiles
Filter Profiles > Production Profile
Allowed networks: Production
Operation Mode: Standard Mode
Default Authentication: Active Directory SSO

Policies > Various rules for groups to have access with a Base Policy of Blocking if the user is not a member of any of the groups specified above in the Filter Policies.

Filter Options > Exceptions
Example Exception entry:
Skip these checks:  Authentication & URL Filter
Matching these URLs:  ^https?://([A-Za-z0-9.-]*\.)?testsite\.com/

At first I thought this was due to a site being HTTPS (which according to the documentation Transparent mode may cause issues and require an entry in the "Transparent Mode Skiplist") but then I ran into the same issue for an HTTP site.

To me there needs to be a way to have an Exception which disables the "Surf Protection" when connecting using the "Transparent" mode.


This thread was automatically locked due to age.
  • I'm even more confused.

    I have multiple Exception Lists with some HTTP & some HTTPS sites.  Some work using Transparent Mode (no proxy settings, simply going out the Default Gateway {which is the UTM}).  And other sites have the "Surf Protection" Report "Business is not allowed" etc.

    Is there a way to define a custom Category?
    When I go under "Web Protection" > "Filtering Options" > "Websites" I can define a site to have a Reputation or Category.  But I really wish there was a way to set your own up that way the Surf Protection does NOT block a site that is on my Exceptions list when using Transparent mode (out the UTM as my gateway).
  • Of course, I really wish that in the "Web Protection" > "Policy Test" you could do the following:

    Define what Mode (Transparent, Standard, etc. and what UTM Port for Proxy settings)
    See a Trace of the order of the rules are checked and the reasons for why they continue or stop.


    Along those same lines, I wish the Firewall section has a Packet Tracer that did the same thing (think Cisco ASA Packet Tracer as an example).
  • Even if I add the site with a regular expression to the "Default content filter action" the site will not load when in Transparent Mode using the UTM as gateway (no proxy settings).

    2014:05:16-15:04:19 rt098-utm01-1 httpproxy[18046]: id="0002" severity="info" sys="SecureWeb" sub="http" name="web request blocked" action="block" method="CONNECT" srcip="10.2.6.21" dstip="" user="" statuscode="403" cached="0" profile="REF_DefaultHTTPProfile (Default Web Filter Profile)" filteraction="REF_DefaultHTTPCFFAction (Default content filter action)" size="3181" request="0x10f21760" url="www.example.net" exceptions="" error="" authtime="0" dnstime="0" cattime="53360" avscantime="0" fullreqtime="55703" device="0" auth="0" country="United States" overridereputation="1" category="9998" reputation="trusted" categoryname="Uncategorized"

    So the URL has an Exception + "Allow these websites" entry yet it still is being blocked by being "Uncategorized" for some reason.
  • Testing some more the sites that are not following the Exceptions are most definitely HTTPS sites when attempting to be Transparent through the UTM as the client gateway.  I've added the "Skip these" "SSL scanning" + "Certificate Trust Check" + "Certificate Date Check" and these have no effect on the "Surf Protection" detecting as Uncategorized or whatever to perform a "Content blocked" response.
  • Correction: I found a HTTP site that has an Exception and is still being blocked by "Uncategorized is not allowed" Content block.
  • Reading in the manual found:

    Note – When using Transparent mode with SSL scanning enabled, you need to enter the target domain(s) as IP addresses. Otherwise the exception will fail for technical reasons.

    Okay, so I'm going to have to create some IP address entries for the HTTPS sites.. but then why would a plain old HTTP site not work?
  • Figured it out!!!!

    Exceptions apparently must have a domain entry not just the regular expression I was using.

    ^https?://([A-Za-z0-9.-]*\.)?pleasework\.net/
    www.pleasework.net
    login.pleasework.net


    What's crazy is I swear the regular expressions work for Standard mode but apparently not for Transparent mode.
  • Tested further to figure out the Transparent using UTM as Gateway with Web Protection > Filtering Options > Exceptions:

    Examples:
    ^https?://([A-Za-z0-9.-]*\.)?testsite\.com/
    testsite.com

    The Regular Expression entry works for Web Proxy connections as an Exception List without issues.
    The Domain String expression (testsite.com) works for the Transparent (Athentication None) with the Block Policy for testsite.com & subdomains (www.testsite.com, login.testsite.com).

    So at least your exceptions do NOT need to have every single subdomain spelled out in the Exceptions List.
  • Hi BlackAndBlue,

    Interesting to watch your process.  [:)]

    First of all, ignore the statement in the manual regarding IP addresses.

    Second of all, you should not require plain domainnames such as testsite.com in the exceptions.  If adding this makes it work then that suggests an error in your regex preventing it from matching.

    Third, while testing please pay attention to this part of the log line:
    exceptions=""
    If it is "" that means no exceptions were found/applied.  If it is something like exception="urlfilter" then the exception was applied.

    Based on your posts, I think your problem is that the exception is not matching your browsing (rather than the exception is matching and applied but you are being blocked anyway).

    In general, your regex looks good, I don't know off the top of my head what the issue is.  You can try using this tool to help write appropriate regex:
    Quick RegEx for URLs | UTM Tools

    If you remove the bare domain names and find the regex is not matching (eg exception="") can you please do a screenshot of your exception and post the corresponding log line that you think should have matched but did not.