Guest User!

You are not Sophos Staff.

[9.171] Web filter profiles not working as expected when Webcontrol enabled with EP

I have a webfilter profile setup for my internal LAN. This profile uses a policy (time based) to be less restrictive in the evening hours.
When I have the Sophos Endpoint installed and webcontrol is configured, the resulting policy always seems te revert back to the base policy.
As soon as I put the endpoint in an endpoint group with webcontrol disabled the less restrictive policy is working again (after a short time).

I am using the web filtering with transparent proxy and no authentication.
  • To be clear, the issue is that time based policies are not working when you have EP Web Control enabled (eg enforcement is done on the EP).  They are working when you are not using Web Control (eg enforcement is done on the UTM)?

    I'll look into this.  One quick thing - I know there are potentially some confusing things with time zones.  Is the timezone of the UTM, Web Control, and Endpoints all the same?

    AFAIK, everything is interpreted as local time.  So if you UTM is GMT and your EP is GMT+1 then enforcement by the EP will occur one hour later.
  • Yes you are correct. Only when EP web control is enabled the time based policies don't seem to be processed.
    It's not a time issue, all my machines are in GMT+1 and so is my UTM.

    Managing several Sophos UTMs and Sophos XGs both at work and at some home locations, dedicated to continuously improve IT-security and feeling well helping others with their IT-security challenges.

    Sometimes I post some useful tips on my blog, see blog.pijnappels.eu/category/sophos/ for Sophos related posts.

  • An update:
    It turns out I didn't (but still don't) fully understand how this works.
    I had my profile based on the source network but "forgot" to also enter the computer group. I just thought that when my endpoint would be in the right network, it would still use this profile but it doesn't (where a device without an endpoint installation on it does still use this profile. It also works for endpoints with web control disabled).
    However, when I now move my device with the endpoint (and webcontrol enabled) to a different VLAN, I get the default content filter (blocking all others). I figure this is right, since I'm not in a network that has less restrictions (although the computer group still is te same).
    Then I made a new profile with no network in it, but only the computer group and moved it to the 1st position, thinking (hoping actually) that when the computer group matches (and no source network is added) it would pick this profile, but it doesn't.

    It seems I always must make a profile with both the source network and the computer group in it for every source network behind the UTM that this endpoint could operate from within.
    When I move the endpoint to a completely different network (not behind the UTM), it now also does its job, so it seems to pick the right profile based on just the computer group since I don't have any profiles with an "any" allowed networks.

    So, where's my thinking error?
    1: Is it true that for every protected network (behind UTM) I have to make a profile when I would like the computer group to be "leading"?
    2: Is it also true that when web control is enabled that I MUST have the profile include the computergroup and that just the network is not enough for these endpoints?
    3: Why doesn't a profile with just the computer group in it (and no networks) not work?
    4: Why does a profile with a network in it and a computer group also work when the endpoint in this computer group is outside the UTM's protected networks (and also completely different IP-range than my UTM has itself)?

    A lot of questions, but for now I don't fully see the logic in this yet.

    Managing several Sophos UTMs and Sophos XGs both at work and at some home locations, dedicated to continuously improve IT-security and feeling well helping others with their IT-security challenges.

    Sometimes I post some useful tips on my blog, see blog.pijnappels.eu/category/sophos/ for Sophos related posts.

  • I'm glad this isn't a time issue, since I was having trouble reproducing.  This is likely just an understanding problem.

    1. No that is not true.  The Allowed Networks and Allowed Endpoint Groups is an OR relationship.  You should only need a single Profile with the Endpoint Groups and for simplicity don't have any Networks.

    2. If you have Web Control enabled but an endpoint group does not appear in any profiles the endpoint will use the policies of the Default Profile.  If you are using endpoint with Web Control the Network is never used.

    3. It should.

    4. The network is ignored.  If a computer group is part of a profile it should apply those policies even if you are connecting from a coffee shop.

    It sounds like there is some confusion around the configuration.  Try this:
    First profile contains your endpoint groups and the policies with no networks.
    Second (and all remaining) profiles contain networks and no endpoint groups.

    If it does not work as expected then can you send screenshots of your config?
  • Hi Michael,

    I think it doesn't work as expected:
    I created a new top profile which only has the endpoint computer group (and no networks) on which I created a policy to only warn on nudity. I moved this profile to the top and installed the endpoint on this machine (currently outside my own UTM). Install went fine, web control shows enabled and the computer shows online in UTM.
    However when trying to open such a page it gets blocked by the UTM instead of a warning.

    I attached a file with several screenshots in it.

    Managing several Sophos UTMs and Sophos XGs both at work and at some home locations, dedicated to continuously improve IT-security and feeling well helping others with their IT-security challenges.

    Sometimes I post some useful tips on my blog, see blog.pijnappels.eu/category/sophos/ for Sophos related posts.

    webfiltering.zip
  • First of all, thank you for the detailed screenshots - if only everyone gave this level of detail when they report problems.  [:)]

    Second of all, there is nothing obvious that I can see that is wrong in your configuration -- it should work.  So we are on to debugging.

    There are a series of things to do to simplify and isolate the issue.

    1) Simplify by not using Warn
    Since Warn is a new feature, can you try testing without using it.  For example your Default content filter action can block Nudity and Less Restrictive block Games/Gambles (use poker.com to test).
    Note: When Warn is done on the Endpoint it displays a page labelled Block, but with a proceed button.

    2) Simplify by not using unnecessary policies
    Go into the Pijnappels Endpoint Group profile, click on Base Policy and set it to the Filter Action called Less Restrictive.  Now you can delete (or disable) the policy called Less Restritive.

    3) Confirm that the Endpoint is receiving policy from the UTM
    Go into this hidden directory (Windows 7).  If you cannot find it then try in Windows Explorer navigation bar typing in %PROGRAMDATA%
    C:\ProgramData\Sophos\Web Control\Policy
    There should be a bunch of files in there.  Sort by filedate.
    Make a change to the "Less Restrictive" Filter Action on the UTM.
    Within 10 minutes there should be a few new files in the directory (you'll be able to tell from the filedate)

    Please do the test again.  If you are still not getting the correct policy, can you give me the relevant timeslice from /var/log/eplog, /var/log/epsecd.log and /var/log/http.log.

    Also can you tell me, on the Endpoint Protection, Computer Management, Advanced tab, what the UTM ID and Token are.  From that I can look up your system in the cloud db.

    If you prefer you can PM me, and we can take it there or in email.  Or here.
  • Hi Michael,

    1) changed as to your suggestion, less restrictive now blocks games and allows nudity
    - I already saw the proceed button before, but as you can see in the screenshot it was not there

    2) thanks, you just showed me how to think more easily.

    3) Yes, the files change within minutes of making changes in webadmin

    Things have changed now, but are not quite all right yet. What I have now (endpoint connected in the UTM's Internal LAN and time within less restrictive hours):

    I can't open gambling sites, but can open nudity
    When I disable the second profile (the internal LAN) but leave the top one (Endpoint profile) enabled, it all turns around, so no nudity no more but I can succesfully open games site; so it looks the first profile is somehow skipped and the default web filter profile kicks in.
    After again enabling all profiles and again able to browse nudity (but not games) and then disconnecting from my LAN and wirelessly connect to my neighbours wifi, I can browse both nudity and games. After connecting back to my ethernet cable, games are blocked again.
    (I don't see the times change on he files in %programdata% when just enabling or disabling a profile by the way)


    About the logfiles; there is no eplog in /var/log. The other 2 files are there and I have attached (roughly) the time frame from my testing.

    UTM-id: c98d2e44-f19e-3e6d-bb69-ab9d964ad007
    Token: 8SNMPUF2B1VOGf19e

    If you like I could also create you a login to the webadmin. In that case please pm me the IP from which you would like to connect and I'll set it up for you and PM you back. All other things can go public, more people can probably learn from it.

    Managing several Sophos UTMs and Sophos XGs both at work and at some home locations, dedicated to continuously improve IT-security and feeling well helping others with their IT-security challenges.

    Sometimes I post some useful tips on my blog, see blog.pijnappels.eu/category/sophos/ for Sophos related posts.

    logs.zip
  • The lack of eplog.log says the Endpoint never sent any logs back to the UTM, which matches a bit of what you see - no enforcement by the Endpoint.

    I'll have a developer look at the cloud server side.

    In the meantime on the windows machine can you do the following:
    Run regedit and go here:
    (32bit) HKLM\SOFTWARE\Sophos\Web Intelligence
    (64bit) HKLM\SOFTWARE\Wow6432Node\Sophos\Web Intelligence
    Create a DWORD called "LogLevel" and set to 3.
    Then go into the \Web Control 
    Create another  DWORD called "LogLevel" and set to 3.

    Visit a single HTTP website.

    Post the file c:\Windows\Temp\swisdiag.log here.

    Note: You should set the LogLevel back to 0 for both, otherwise you the log file will eventually fill your HDD.
  • Hi Michael,

    Here's the requested logfile.

    Managing several Sophos UTMs and Sophos XGs both at work and at some home locations, dedicated to continuously improve IT-security and feeling well helping others with their IT-security challenges.

    Sometimes I post some useful tips on my blog, see blog.pijnappels.eu/category/sophos/ for Sophos related posts.

    swisdiag.zip
  • Thanks for reporting. We are now tracking this as Mantis ID #29977