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 Block not blocking?

Hi:

ASG 8.200

I keep getting ssh connection attempts from China so turned on country block for China. But that didn't really stop it for instance 121.37.60.154 still made some attempts till denyhosts blocked it on my server. Did 121.37.0.0 - 121.37.255.255 somehow not get added? Can we view the blocks that Astaro uses for each country? When new blocks (of IPs) get allocated does Astaro push them as rule updates?

I am not really worried about it but am curious about Country Block [:)]


This thread was automatically locked due to age.
  • 121.37.60.154 is listed by the Geolocate database in Astaro as China.
  • Weird I wonder why it wasn't being blocked then? Oh well I will wait awhile and see if any other IPs from China show up.
  • My guess is that you already had live sessions active from that source when you turned on Country Blocking.  It may not be able to affect existing sessions, only new ones.

    The way that I use to query the database directly, if I want to test an IP, is to attempt to connect to the IP address through my browser.  Then look in the web proxy log and it will show the lookup results.
    url="121.37.60.154/favicon.ico" exceptions="" error="" country="China"
    Not especially elegant, but it works.
  • Maybe I misunderstand? Is Country block only for blocking websites or perhaps just TCP traffic? I don't use the web proxy but I understand how you are using it to test. Anyways I wasn't really sure how to show active sessions in ASG as netstat didn't show much so I rebooted which I assume would close any connections. Oh before I did that I added Hong Kong too just incase. After it came back up I could still ping that IP (from machines behind the ASG and from the ASG itself) and get a full traceroute so clearly not blocked. The description of the feature makes it sound like it applies before any filter rules that I could set and blocks both incoming and outgoing, I assume dropping all traffic. Just to be sure I tried another IP in china and it too was ping'able 221.192.199.46 (note I found that IP via google and APNIC confirms it is in China).
  • Hi:

    ASG 8.200

    I keep getting ssh connection attempts from China so turned on country block for China.  


    Try changeing ssh port from 22 to some other port ,there are many scrits to guess passwd on ssh ,i had a same problem on my linux DMZ but after changeing port it really stop
  • @utm_kid, Indeed [:)] Although mostly I am just trying to learn about ASG. They really cannot guess passwords as I don't allow passwords it is keys only and specific accounts + denyhosts script. I am a little surprised that ASG IPS system doesn't pick up on these things? Before I used ASG I used to have lots of control over SNORT and it could pick up on things like this and add a block rule much like denyhosts but on my gateway.
  • Is Country block only for blocking websites or perhaps just TCP traffic?
    Country Blocking works for all traffic, both inbound and outbound.

    tried another IP in china and it too was ping'able 221.192.199.46
    I just tested this specific IP and when I enable Country Blocking, I can no longer ping this address.

    I have an idea what may be happening, making Country Blocking appear to not work for you.  After you've ticked boxes for countries that you wish to block, did you scroll down to the bottom of the page and click the apply button?  See the screenshot attached.
  • Sadly yes I did click that apply button and got the "Location based blocking has been saved successfully." also after reboot the boxes were still selected. I have tried pushing apply a few more times but no dice. I have also tried disabling it waiting for awhile and re-enabling it and waiting for awhile and then testing. I even blocked the whole USA where I am but it didn't stop anything. I then enabled web filtering and it did block websites in China both by IP and hostname but zero effect on say ICMP. Next I created a rule to block the test IP (221.192.199.46) this rule did in fact work so I can at least block traffic but the country block doesn't work except for with web filtering. My pattern version is 22662.
  • Something is definitely not working correctly with Country Blocking on your system then.  It may have to do with the 8.200 soft-release that you have installed.  This is not the GA (final version) of 8.200 and has a number of bugs in it.

    Try installing the soft-release 8.201 and retest to see if that fixes things.  https://community.sophos.com/products/unified-threat-management/astaroorg/f/52/t/28085
  • I did try 8.201 right after you mentioned it Scott but that didn't help. But I haven't given up [:D] When I get a moment free I will install asg-8.102-esx-v4 (at least I will try to) which I have already downloaded (As I use ESXi 4.1). Then I will test that base system and then I will try to up2date to 8.201 and test again.