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.
  • May I ask what exactly you mean by "it's not working" ? You will still get block report in the logs for connection attempts (at least on the packet filter reports). What you shouldn't see any more is failed logins.

    Just to make sure we're not confusing the issues here.
  • @fulgan, not working in the sense that I can ping blocked IPs and Scott said that when he enabled country blocking he could not. Also I can reach websites with IPs in those blocked ranges. No I do not use web proxy. Again my understanding is an IP that is blocked via country block will block all traffic to or from it. Additionally it takes precedence over any user defined packet filter rules but essentially its behavior should act just like putting a drop rule in the packet filter. Also the packet filter log doesn't show those connections at all which isn't surprising as they aren't being dropped or rejected.
  • Ok. I just wanted to make sure there wasn't simply a missunderstanding.

    Yes, country blocking should drop all packets to and from the blacklisted netblocks. If it's not working it means that either the GeoIP DB isn't working for some reason or that the packet filter itself is busted (which I don't believe is the problem: it's too easy to test).

    BTW, ping won't use web proxies. They can go through SOCKS proxy and VPN tunnels, though, but that's it: they should therefore be blocked as well as everything else.

    Have you checked if you pattern update is working ? Mine is (currently) at version 22700.

    Otherwise, if I were you, I'd perform a backup of my config and reinstall the firewall.
  • Okay finally got a chance to reinstall. I started with the ESXi ovf deploy which was 8.102 and did not change any settings other than like what the wizard forces you to do. Then I started pinging the test IP from ASG ssh session and then I enabled country block and BAM it stopped it. Next I upgraded to 8.103 and it still worked, but when I upgraded to the 8.20x branch it stopped working. So I allowed all outbound traffic in packet filter so I could ping from other boxes and indeed I was able to and country block was not working. I then realized my box was being really slow, turns out the OVF image is not a good idea as it uses a non SMP kernel [:(] So I download the recent 8.103 ISO and upgraded that so I could use all 4 cores (oh and VMXNET3 works [:)]. Anyways country block didn't work there either. Also it looks like I am not the only person having this problem now as google is starting to show more results. Hence I am pretty sure this is now a valid bug and not me lossing my mind xD

    (I am currently at pattern version 22712)
  • 8.200 ISO should be out soon, now that 8.200/8.201 have gone GA.  When that happens, I'll reinstall and see if I can replicate.
  • Well I just had something rather odd happen maybe totally unrelated but here goes:
    I have a DNAT rule and a firewall rule to allow ssh inbound to my ssh server and today I could not connect. I checked to make sure the rules were right and they were but my firewall log kept showing blocked ssh. So I went about trying to figure out why and it took me a really long time btw but thankfully for those usually annoying yellow pop up tool tips as I hovered over my External (WAN)(Address) in DNAT edit and it showed the wrong address....oh well that explains why DNAT isn't working. The IP it was showing was the same as the interface was reporting and what ifconfig was showing but it was not my IP address as the dropped ssh in my log was to my real IP address the one I manually entered on the server at school I was using to connect to home with. Anyways I ended up having to reboot to get the right address and then SSH worked again. I am not really sure what could cause this, I mean sure I like to blame my ISP...anyways I have ADSL and the box they gave me takes care of the PPPoE so it is in bridge mode and my dynamic IP is from a /26. And yeah after having my IP match up I tried country block again just to make sure it wasn't related so easily but nah it didn't work. But I got thinking that in 8.200 iirc they added the ability to change your MAC address, now I haven't done that or even played with it but I got thinking that seeing DHCP usually binds to a MAC address it might cause the mismatch in IPs which might mess up country block which I am sure is layer 3 only. 

    Sorry that is all I have for today [:D]