Guest User!

You are not Sophos Staff.

[9.185] web filtering really slow with UTM behind net (NAT) modem

Last weekend I had to change my modem due to upgrades from my ISP.
Unfortunately the new modem doesn't allow me to put in bridge mode, so I gave the UTM a fixed IP-address on the External WAN interface and entered that IP-address as a DMZ address in the modem.
All IPSEC connections work again, so do my NAT-rules.

It seems however that since the change the webfiltering has become slow to extremely slow.
Some websites take several seconds (4 - 20) before starting to load. 
Some websites take ages to load completely, usually in such a case after almost all the website got shown, the status bar shows google-analytics.com, or google.com or googly-syndicate.com, but also doubleclick.net and some others seem to stall loading these websites for a long time (sometimes over a minute).

It looks like that when a site is loaded and I reload it within a couple of minutes, then the reload is normal (new content shows up almost immediately and also the total loading time of the site is quick). If I wait too long I see the delays again.
Right now the only category I block is nudity. A/V scanning is on (single engine) and my machine is a Intel Core i5 4670 with 8GB of RAM and CPU governor switched to performance (but with ondemand it shows the same behavior).

When I switch off web filtering all delays are gone immediately, but they return as soon as web filtering gets enabled again.

Google (also just search it by entering search words in the browsers address bar) seems to always take a long time when webfiltering is switched on. On other sites I didn't really find same behavior on different visits, however the delays are really annoying.

I'm using the transparent filtering with no authentication and no https scanning
  • My first random guess is DNS.  Please check all your DNS configuration.

    Please do a little bit that is slow and post (or IM me) the corresponding Web Protection log (http.log).  What we are looking for is the new ***xtime= values that are logged for precisely this kind of debugging.
  • Hi Michael,

    I think this is about all the logs of one request I just opened (I had to attach it since there were too many characters to post directly).

    Current DNS setup:
    Internal LAN is on allowed list on Global
    Forwarders is an availability group with 8.8.8.8 and 8.8.4.4 in it, Use forwarders assigned by ISP is not selected and DNS hands out UTM-Internal LAN address as DNS-server to the clients.
    I believe I started with use forwarders assigned by ISP selected, and changed to this availability group to see if it would speed up things.

    If this is a DNS-issue, then why don't I see these delays when web filtering is switched off?

    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.

    log.zip
  • I was just shown this thread which may be causing this problem. Could that be?
    Currently my dns-resolver.pl uses 6.4% memory of 8GB, so that's roughly half a GB for just the dns-resolver...

    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.

  • New update, also see my other post about it.

    Bottomline: My ISP was able to setup my cable-modem in bridge mode, and now all delays seem to be gone.

    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.

  • Three things I see in your log:

    1) You are using an endpoint, but the endpoint is not configured by the UTM (or at least EP Web Control is not on).  Can you confirm this?

    2) Three requests (at the same time) has a slow categorization lookup that timed out after 6 seconds.  This is somewhat expected, everyone will get a couple every day because we dynamically bring servers up and down.  It might just be a co-incidence but it may also be something to monitor.  Bridge mode will make no difference.

    3) You have several log lines like "Connection to KNMI - Koninklijk Nederlands Meteorologisch Instituut using IPv6 timed out, re-trying to connect using IPv4" and the corresponding request takes 60 seconds.  Sometime about your non-bridged configuration does not like IPv6.

    In summary:
    You had (most likely) a bad IPv6 configuration in non-bridge mode.

    You had what looks like SXL categorization timeouts.  Can you run the following command, which will tell me how often you get these:
    zgrep -c -E 'cattime="[0-9]{7}"' /var/log/http/2013/12/http*

    Finally, if you intend to be running an endpoint that is managed by the UTM including Web Control, something is not correct.  The endpoint is not receiving web control configuration from the UTM.
  • Three things I see in your log:

    1) You are using an endpoint, but the endpoint is not configured by the UTM (or at least EP Web Control is not on).  Can you confirm this?


    Correct, I specifically disabled webcontrol in the computergroup my computer is in. If I enable it, my time-based (less restrictive profile) doesn't work, but in fact it looks like it always defaults to the Default web filter profile. I think I already made a mention in the beta forum for this, but I saw the very same behaviour in 9.1

    2) Three requests (at the same time) has a slow categorization lookup that timed out after 6 seconds.  This is somewhat expected, everyone will get a couple every day because we dynamically bring servers up and down.  It might just be a co-incidence but it may also be something to monitor.  Bridge mode will make no difference.

    3) You have several log lines like "Connection to KNMI - Koninklijk Nederlands Meteorologisch Instituut using IPv6 timed out, re-trying to connect using IPv4" and the corresponding request takes 60 seconds.  Sometime about your non-bridged configuration does not like IPv6.

    My IPv6 is setup through the HE Tunnel Broker (by now I realize that I didn't check if it was connected okay when my modem was still routing, could easily have been the main cause.

    In summary:
    You had (most likely) a bad IPv6 configuration in non-bridge mode.

    You had what looks like SXL categorization timeouts.  Can you run the following command, which will tell me how often you get these:
    zgrep -c -E 'cattime="[0-9]{7}"' /var/log/http/2013/12/http*


    utm:/root # zgrep -c -E 'cattime="[0-9]{7}"' /var/log/http/2013/12/http*
    
    /var/log/http/2013/12/http-2013-12-02.log.gz:7
    /var/log/http/2013/12/http-2013-12-03.log.gz:2
    /var/log/http/2013/12/http-2013-12-04.log.gz:0
    /var/log/http/2013/12/http-2013-12-05.log.gz:9
    /var/log/http/2013/12/http-2013-12-06.log.gz:0
    /var/log/http/2013/12/http-2013-12-07.log.gz:23
    /var/log/http/2013/12/http-2013-12-08.log.gz:43
    /var/log/http/2013/12/http-2013-12-09.log.gz:117
    /var/log/http/2013/12/http-2013-12-10.log.gz:24

    Finally, if you intend to be running an endpoint that is managed by the UTM including Web Control, something is not correct.  The endpoint is not receiving web control configuration from the UTM.

    Correct, I did disable web control for this computer group since I don't get it to correctly apply my profiles.
    I have a profile for my Internal LAN which at daytime blocks several categories. During evening hours (when the kids are asleep) these categories are on WARN. With web control switched off this works very nice, but with web control on everything just gets blocked no matter what time of the day. All my times are GMT+1 and time of UTM matches time of Endpoint.

    PS. Thanks for your help and insight!

    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.

  • 1)I am aware of the Endpoint time thread and I've got it in my todo to try and reproduce before we open it as a bug.  Lets deal with that in the other thread.

    2) I expect there to be categorization timeouts occasionally as servers rotate.  A background of ~10 a day is fine.  Spiking to >100 is interesting IF we knew that it was a stable system.  But if you lose your internet connection or anything the numbers become meaningless.  I suspect that Dec 9th is just a blip.

    3) It sounds like the IPv6 issue may be resolved but I recommend that if you have any future problems to check your tunnel broker as well.  I have recently had another beta customer get the same timeout message, which could mean there is a code problem in the UTM or if you are both using the same broker a problem on their side.  I'll let you know if I find out more.