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

Country Blocking with Exceptions - some muscle required

In a nutshell, the overall horsepower of the computer running the Sophos UTM seems to make all the difference if you want to use Country Blocking and Country Blocking Exceptions.  

On several software only UTM's, we enabled the Firewall Country Blocking "From" parameter, in order to block connections initiated from most countries, with Country Blocking Exceptions also enabled for SMTP email from all countries and some local traffic (OWA, HTTP, etc.).  After doing so, the CPU's pegged at 100% on several UTM's for hours, though not necessarily starting immediately.  It may be a reflection of worldwide traffic accessing that particular UTM, because some Intel Atom boxes with 4Gb, and other beefier UTM's, were fine.  But several regular boxes with 2Gb and 4Gb were struggling.

On those UTM's that were CPU overloaded, we tried cutting back to just a small number of countries for blocking and exceptions.  That helped for some UTM's, but for others we had no choice but to disable the country blocking entirely to get the CPU utilization down.

The mix of boxes we used were new to old, I7 to Atom's, 4 core to 1 core, 8Gb to 2Gb and SSD's, to SATA.


This thread was automatically locked due to age.
Parents
  • Hi, country blocking just uses IPTables firewall rules, which should be lightweight...

    That said, how is the memory and CPU usage on the struggling systems?

    Maybe this is a new problem in 9.1; country blocking in 8.x (without exceptions) has worked fine for me on fairly low-end hardware.

    Can you open a support case?

    Barry
  • On one of the boxes where you had to disable, did you get a ticket submitted to Sophos Support?  It just doesn't seem like that should cause such a problem.

    Also, you might do a feature suggestion for "Country Allowing" that only allows certain countries.  A kind of parallel to 'Allow by default' vs. 'Block by default' in Web Filtering.


    Hi Bob: I've been thinking the same thing too.  That when enabled, an "all countries, off by default" choice might make better sense in many circumstances, and probably require a lot less horsepower too.

    If you'll recall, Microsoft's original plan for Windows was to let everything in, let everything attach.  That didn't work out so well for them either.

    Anyway I played around with the Country Blocking and Country Blocking Exceptions selections again tonight.  Definitely the weaker, older, slower, fewer core boxes having the issues.  I will go ahead and file a ticket to make sure Sophos is aware and go from there.

    ...country blocking just uses IPTables firewall rules, which should be lightweight...  That said, how is the memory and CPU usage on the struggling systems?

    Maybe this is a new problem in 9.1; country blocking in 8.x (without exceptions) has worked fine for me on fairly low-end hardware.


    Hi Barry. The memory usage doesn't seem to have been unusual or starved, but the CPU usage has been pegged at 100% on the boxes having issues.

    I'm also pretty sure that this isn't a problem of Country Blocking.  But, rather, I think it's the Country Blocking Exceptions that might be causing the problem.

    As I mentioned above to Bob, I will make sure Sophos has a support ticket about it.

    Eric
  • Hello eganders

    If I should make an assumption, my first guess would be, that it's probably not the country blocking itself creating that CPU load, but other processes. Using country blocking outgoing is in my eyes a controversal issue, as it also blocks lot of content servers, mirorr servers, CDN's, update servers used by different products and installed software inside your network.

    My first guess would be, that there are some updaters or something like that Hammering the webproxy or other connections hammering another proxy/service on the UTM. As BarryG already mentioned, the country blocking feature is relatively lightweight, as it's not done per packet, it's done once for a connection AFAIK. [EDIT: Ok, after few minutes thinking...what happens, if you have overwhelming UDP packets, they may put lot more load on the UTM, as UDP connections are stateless...]

    I use the opposite method on the UTM. Outgoing is nothing blocked, only incoming (blocked all Regions exept Europe) and made a few exceptions for global published services as incoming SMTP, DNS requests, as I provide my own DNS server and have my own mailserver running locally...but every other access attempt will be blocked, if it's sourced outside of a european IP.

    As long as I don't have Malware or Bot's in my network, I guess I'm pretty secure on the way using this setup. Access attempts to other published services has significately lowered, as except of europe the whole rest of the Internet is blocked by GeoIP Blocking [;)]

    Never tested it with a low mem appliance, but 4GB appliances have no visible effect on the performance or CPU load.
  • Using country blocking outgoing is in my eyes a controversal issue, as it also blocks lot of content servers, mirorr servers, CDN's, update servers used by different products and installed software inside your network.

    My first guess would be, that there are some updaters or something like that Hammering the webproxy or other connections hammering another proxy/service on the UTM. As BarryG already mentioned, the country blocking feature is relatively lightweight, as it's not done per packet, it's done once for a connection AFAIK. [EDIT: Ok, after few minutes thinking...what happens, if you have overwhelming UDP packets, they may put lot more load on the UTM, as UDP connections are stateless...]

    I use the opposite method on the UTM. Outgoing is nothing blocked, only incoming (blocked all Regions exept Europe) and made a few exceptions for global published services as incoming SMTP, DNS requests, as I provide my own DNS server and have my own mailserver running locally...but every other access attempt will be blocked, if it's sourced outside of a european IP.

    ... I guess I'm pretty secure on the way using this setup. Access attempts to other published services has significately lowered, as except of europe the whole rest of the Internet is blocked by GeoIP Blocking.


    Hi Sascha:  I completely agree with your comments.  My mistake, I should have pointed out in my first post above (I'll edit) that we were only using the "From" parameter (to country block inbound traffic attempting to initiate a connection).  Outgoing connections were not Country Blocked in these scenarios.

    My assumption is the same as yours, that direct access attempts will be significantly lowered by doing this.  Though I suspect that some persistent hackers will attempt to migrate to controlling 3rd party proxy, or bot, computers in allowed countries in order to hack from places that aren't GEOIP blocked.
Reply
  • Using country blocking outgoing is in my eyes a controversal issue, as it also blocks lot of content servers, mirorr servers, CDN's, update servers used by different products and installed software inside your network.

    My first guess would be, that there are some updaters or something like that Hammering the webproxy or other connections hammering another proxy/service on the UTM. As BarryG already mentioned, the country blocking feature is relatively lightweight, as it's not done per packet, it's done once for a connection AFAIK. [EDIT: Ok, after few minutes thinking...what happens, if you have overwhelming UDP packets, they may put lot more load on the UTM, as UDP connections are stateless...]

    I use the opposite method on the UTM. Outgoing is nothing blocked, only incoming (blocked all Regions exept Europe) and made a few exceptions for global published services as incoming SMTP, DNS requests, as I provide my own DNS server and have my own mailserver running locally...but every other access attempt will be blocked, if it's sourced outside of a european IP.

    ... I guess I'm pretty secure on the way using this setup. Access attempts to other published services has significately lowered, as except of europe the whole rest of the Internet is blocked by GeoIP Blocking.


    Hi Sascha:  I completely agree with your comments.  My mistake, I should have pointed out in my first post above (I'll edit) that we were only using the "From" parameter (to country block inbound traffic attempting to initiate a connection).  Outgoing connections were not Country Blocked in these scenarios.

    My assumption is the same as yours, that direct access attempts will be significantly lowered by doing this.  Though I suspect that some persistent hackers will attempt to migrate to controlling 3rd party proxy, or bot, computers in allowed countries in order to hack from places that aren't GEOIP blocked.
Children
No Data