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 - What do the settings really mean?

So I've been doing a lot of reading and searching however I cannot make sense out of some of the Country Blocking settings.  Searching this forum area showed six pages of country blocking (searched on country) and nothing referenced what FROM and TO actually do.  Google wasn't helpful either.

I'm running UTM Software version 9.313-3.

Under Country blocking there are four settings, OFF, ALL, FROM, and TO.

I understand OFF and ALL and they work as I would expect...

OFF: Country blocking is not on.
ALL: Country blocking is fully on.

The confusion comes with the other two settings, FROM and TO.

The user manual states:
FROM: Traffic coming from this location is blocked.
TO: Traffic going to this location is blocked.

So I set up a block to Germany (where this forum is located) and selected FROM and I would have expected to have all responses blocked, but they are not.  So now "I think" that FROM means something that wasn't requested by my web browser in this situation.

Could someone please explain exactly what FROM and TO actually do?

Note: I also setup blocks to the Great Britain and even to my neck of the woods, USA, still confused.


This thread was automatically locked due to age.
  • Inbound unsolicited traffic is always blocked. - Stateful packet filter. 

    FROM :

    You run a DMZ webserver that the world can get to. You see many attacks coming from country X. Here is where the FROM comes in. You can say block all traffic FROM country X.

    TO and ALL:

    The TO and ALL will affect everyone on the inside of your network. User Amy trys to go to www[.]someblockedcountrysite.com and she is blocked. 

    FROM

    I thought that if you had FROM blocked, that even though you started the conversation, it would be blocked by the country blocking filter. (Allowed out t that IP, but that IP Is not allowed in.) 


    Can anyone else comment?

    This is why knowing how traffic flows through the UTM is important. It helps to know what it will do, when. For example, if you block Germany you cant get to German sites - the exceptions does not work. However, if you put that German URL in the proxy skiplist, it bypasses the country block and follows firewall rules, and allows that URL so long as the firewall rules do not block it. I need to take out that last column and make a new column in the center for this situation. I do not know if the IPS and App Control would still be in play in this situation. I have not tested it yet. 

    C68

    * It may still need some work. [:O]


    **Update**

    I did some testing.

    I think the FROM is only for unsolicited incoming traffic, IE webservers, VPN request, etc.

    I blocked sears in applicaiton blocking. I then created a proxy skiplist for it and tested. Sometimes this override does not take right away, but based on what I am seeing, application control is still in full affect as I still can't get to sears.com (See new updated attachment) 
  • Thanks for the reply.  So it appears that FROM works as I suspected which is a good thing so I can leave many of the countries set to FROM, with most set to ALL.  I read about the firewall rules conflict with the country blocks.

    At this point I am going to start documenting my changes and issues with each change because I am new to this UTM world and I can be honest by saying I am way under water at this point in time.  I have figured quite enough to get this UTM running for the most part but there is so much more to learn in order to do things right.  To be honest, maybe it's overkill but once I have it all figured out, I think I will be very pleased.
  • I read about the firewall rules conflict with the country blocks
    Not certain where you get this idea from.  There's no conflict.  Country Blocking has precedence over any manually created firewall rules.  If something is blocked by CB, then manually created firewall rules are never evaluated, ergo no conflict.  [:)]
  • Not certain where you get this idea from.  There's no conflict.  Country Blocking has precedence over any manually created firewall rules.  If something is blocked by CB, then manually created firewall rules are never evaluated, ergo no conflict.  [:)]
    Just my invalid perception I guess.
  • I too have set country blocking (China ALL) with the thought that no attempts to connect to my UTM would be successful.  The reason I wonder about this is that I am getting emails hourly on 'Too many failed logins from  for facility sshd.' not to mention from Russia and Brazil... should not everything be blocked when setting up Country blocking?[:S]  I check the IPs on ip-db dot com to see where they come from then block the country...
    Thanks in advance!
  • Could you post what the Firewall log states, just a single line would be fine.  If your actual IP is listed, feel free to change it, maybe take the last digits and make them "nnn" or something like that.  I'm curious if you have a firewall rule allowing all SSH to pass.  I myself am still just getting into this program but others may be able to help.  Also, I'm on vacation, not at home and have very crappy internet connection, I can't even remote into my home, sucks!  Stupid hotel.
  • Not certain where you get this idea from.  There's no conflict.  Country Blocking has precedence over any manually created firewall rules.  If something is blocked by CB, then manually created firewall rules are never evaluated, ergo no conflict.  [:)]


    Scott,

    True, at least until the proxy and proxy skip list is used. This forces anything listed in the skip list through the firewall rules, bypassing Geo blocking. This is my workaround for the broken country exceptions.  See my second image in my previous post in this thread. 

    itdv70, 

    Please post some firewall logs. I know the country blocking works, as I block every single country in the world, except for the US. [:D] I tested it extensively. For GeoIP lookups, try maxmind. https://www.maxmind.com/en/geoip-demo

    A basic diagram of your setup would be helpful too. 
    [LIST=1]
    • Do you have a DMZ server with SSH exposed? 
    • If not, what server has this SSHd running?  
    • Do you have the country blocks set to from, to, all, or off for China, Russia, and Brazil?
    [/LIST]

    C68