Guest User!

You are not Sophos Staff.

Feature request - packet filter by country

I see that ASG can already resolve IPs to the parent country in the Network Security dashboard. It would be really nice if blocking by country was an option in the packet filter.

Greg
Parents
  • FWIW, there are ways to do this manually... You need to find all the IP blocks, and then create definitions and groups for them.

    Barry
  • FWIW, there are ways to do this manually... You need to find all the IP blocks, and then create definitions and groups for them.

    Barry


    Barry,

      Yeah, I was going to say in that post that I know it is technically doable manually. But have you seen the table of IP ranges you have to block? I don't know if the ASG could even hold that many rules, but if it could, it would still be hours of work and a pain to maintain. A check box for each country would be really nice.
  • geo location of ips is not foolproof.  I am starting to see folks who are blocking in this fashion and wind up blocking entire ranges because one range used to be african but it got moved to japan and vice versa.  This is going to become more of an issue with ipv6.
  • Barry,

      Yeah, I was going to say in that post that I know it is technically doable manually. But have you seen the table of IP ranges you have to block? I don't know if the ASG could even hold that many rules, but if it could, it would still be hours of work and a pain to maintain. A check box for each country would be really nice.


    Not only have I seen it, I've done it; for all of APNIC, LACNIC, AFRINIC and RIPE.
    I must admit that doing it by region is MUCH easier than by country (the blocks are much larger and fewer), but the concepts are the same.

    If you don't communicate with Asia, blocking APNIC really cuts down on spam, but you have to be careful as it includes NZ and Australia.

    You can do it with only 1 rule on the PF page, but it's a lot of definitions. Performance shouldn't be much of an issue as Linux uses hashes for rule lookups, which are quite efficient.

    I've posted about it on these forums before, but it'd prolly be best to get the current blocks anyways.

    Barry
  • I do this sort of thing right now for emails, but behind my ASG by rolling my own DNS BlackList, that I added to the list in ASG.
     
    I use a program called Wrbldnsd as the bl dns server. I wrote a script to automate several tasks involved in the care and maintenance of the database used (flat text file). The script first calls a windows port of RSync to download the "everything" zone file from the countries.nerd.dk guy and places it in a temporary location. Then the script parses through this file, removing entries for the countries that I allow us to get emails from. The last two things that it does are replace the "live" DB file with the new one and then emails me a little status report about the new DB file. The script is set to run once per day.
     
    If there's a false positive (usually caused when a sender is vacationing overseas or when mail servers become outsourced), I just add a blacklist exception for that email address or email domain.
     
    I agree that this would be very handy to have internal to ASG AND be able to apply it to all network traffic.  All told, the bl db for this is 2.3MB and the updating script to pull the new records and parse them is around 40 lines long.  Shouldn't be much of a resource drain as long as the geolocate db is kept on the ASG itself.
  • Yeah, if Astaro could simplify that so it's just a check box it would be really nice.
Reply Children
No Data