Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Which countries do you IP-block on general principle? - Page 2
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Which countries do you IP-block on general principle?

2

Comments

  • ip_deny=am az bg by ge kg kz md ru tj tm ua uz ae af ao bf bh bi bj bw cd cf cg ci cm cv dj dz eg er et ga gh gm gn gq gw id il in io iq ir jo ke km kw lb lr ls ly ma mg ml mr mu mw mz na ne ng om pk ps qa rw sa sd sl sn so st sy sz td tg tn tr tz ug ye yt za zm zw cn kp mn mo
    
    Thanked by 1AlwaysSkint
  • Take a look at Crowdsec for ip block lists. They have an IPS agent for many different products and a bouncer that can block based on their community feed and your IPS output. Like fail2ban on steroids.

  • I don't block any specific countries, but I run game servers and will kick any players connecting from any known VPN/Datacenter IPs as they're common for bots and ban evasion.

  • @jingfanqin said:
    Why block Chinese traffic? China usually accesses websites outside of China through a proxy.

    I get tons of SSH attacks and they mostly come from mainland chinese IP's

  • @szymonp said:

    @jingfanqin said:
    Why block Chinese traffic? China usually accesses websites outside of China through a proxy.

    I get tons of SSH attacks and they mostly come from mainland chinese IP's

    That's what hackers do, ordinary people just browse youtube facebook.

  • Chinese B2B is great money, the general Chinese population? Terrible money, even once you get past the VPN's.

  • @SirFoxy said:

    Chinese B2B is great money, the general Chinese population? Terrible money, even once you get past the VPN's.

    I agree, there are some Chinese businessmen that I have encountered who are fantastic to deal with and very straight to the point vs the typical Western way, but the consumer mindset of filing disputes and chargebacks doesn't bode well in the Western markets.

    Add the VPNs, the wall, the language barrier, the consumer mindset, it's one hell of a challenge - but there are 1.6 billion people in China and that's gotta be worth something to the right person.

  • I see almost the same quantity of scans & hacking attempts from 'murica, as from IN, CN and RU. It's only the potential customers for my clients, that prevents it from being blocked too.
    I'd block AWS and Hetzner if it wasn't for the various service providers (Hetrix/Uptime/CSF/CWP) that naively use their servers.

    Thanked by 2skorous dahartigan
  • @dahartigan said: 1.6 billion people rabbits..

    Thanked by 2dahartigan bulbasaur
  • @tetech said:

    ip_deny=am az bg by ge kg kz md ru tj tm ua uz ae af ao bf bh bi bj bw cd cf cg ci cm cv dj dz eg er et ga gh gm gn gq gw id il in io iq ir jo ke km kw lb lr ls ly ma mg ml mr mu mw mz na ne ng om pk ps qa rw sa sd sl sn so st sy sz td tg tn tr tz ug ye yt za zm zw cn kp mn mo
    

    Nice, can I ask what firewall this syntax works on? This is much cleaner than using iptables.

  • AlwaysSkintAlwaysSkint Member
    edited April 2022

    @redcat said: This is much cleaner than using iptables

    CC_DENY = "RU,CN,TH,TW,IL,SG,AG,RO,SC,MX,KR,MD,EG,PK,IN,PH"
    
  • I don’t block whole countries, just single IPs when they’re annoying, and the whole /24 if multiple IPs in that range are annoying and do not really have a legitimate purpose to connect to the service.

  • Adam1Adam1 Member
    edited April 2022

    china, russia, ukraine, usa, brasil, indonesia

    Googlebot and bing whitelisted.

    google cloud, amazon, azure, OVH, DO and a bunch of other ASN's blacklisted also.

    I also block non en-* accept-language headers

    UK service.

  • jarjar Patron Provider, Top Host, Veteran

    I don't block countries but I RBL most of chinanet which is kind of like blocking China. The ratio of good traffic to bad is far too high into the latter.

    Thanked by 2webcraft Arkas
  • Adam1Adam1 Member

    @jingfanqin said:
    Why block Chinese traffic? China usually accesses websites outside of China through a proxy.

    I dont want chinese customers.

  • titustitus Member

    I not blocking full countries, but I block full IP ranges (usually /24) which make recurring or continuous problems (recurring port and vulnerability scans, WP attacks, etc reported by the used security tools). Most of them looks like a simple malicious network and some of them are a "shady' 'security researcher network" whos believe "they have the right to make security/network scans" without permission from the targets.

    Most of this IP ranges from China, Russia, Netherlands, and some of them from USA & Germany. I block them because of the experienced malicious activity, not for political or other reasons.

  • dane_dohertydane_doherty Member
    edited April 2022

    @titus said: I block them because of the experienced malicious activity, not for political or other reasons.

    Yes, obviously not for political reasons, it's just that some countries have negligible amount of genuine traffic it's easier to just block it all.

    @titus said: I not blocking full countries, but I block full IP ranges (usually /24)

    @let_rocks said: I don’t block whole countries, just single IPs when they’re annoying, and the whole /24 if multiple IPs in that range are annoying and do not really have a legitimate purpose to connect to the service.

    I never block single IPs nowadays, always a whole /24 block minimum.

  • dosaidosai Member

    Block /48 when mindless idiot trying to circumvent bans on irc.

  • fynixfynix Member

    JaLET butt kicked again and again.

  • @redcat said:

    @tetech said:

    ip_deny=am az bg by ge kg kz md ru tj tm ua uz ae af ao bf bh bi bj bw cd cf cg ci cm cv dj dz eg er et ga gh gm gn gq gw id il in io iq ir jo ke km kw lb lr ls ly ma mg ml mr mu mw mz na ne ng om pk ps qa rw sa sd sl sn so st sy sz td tg tn tr tz ug ye yt za zm zw cn kp mn mo
    

    Nice, can I ask what firewall this syntax works on? This is much cleaner than using iptables.

    Just config file for a bash script that generates iptables rules.

  • CybrCybr Member

    @tetech said:

    ip_deny=am az bg by ge kg kz md ru tj tm ua uz ae af ao bf bh bi bj bw cd cf cg ci cm cv dj dz eg er et ga gh gm gn gq gw id il in io iq ir jo ke km kw lb lr ls ly ma mg ml mr mu mw mz na ne ng om pk ps qa rw sa sd sl sn so st sy sz td tg tn tr tz ug ye yt za zm zw cn kp mn mo
    

    Surely it would make more sense to use a whitelist if you're blacklisting most of the world? That way you also don't need to add every new country or island that becomes independent.

  • @Cybr said:

    @tetech said:

    ip_deny=am az bg by ge kg kz md ru tj tm ua uz ae af ao bf bh bi bj bw cd cf cg ci cm cv dj dz eg er et ga gh gm gn gq gw id il in io iq ir jo ke km kw lb lr ls ly ma mg ml mr mu mw mz na ne ng om pk ps qa rw sa sd sl sn so st sy sz td tg tn tr tz ug ye yt za zm zw cn kp mn mo
    

    Surely it would make more sense to use a whitelist if you're blacklisting most of the world? That way you also don't need to add every new country or island that becomes independent.

    Depends on the objective. IP lists are never 100% accurate and sometimes it is preferable to get false-negatives (allowing some range that shouldn't be) than false-positives (blocking some range that shouldn't be). The config gives the option to flip if the number of rules is less.

  • CybrCybr Member

    @tetech said:

    @Cybr said:

    @tetech said:

    ip_deny=am az bg by ge kg kz md ru tj tm ua uz ae af ao bf bh bi bj bw cd cf cg ci cm cv dj dz eg er et ga gh gm gn gq gw id il in io iq ir jo ke km kw lb lr ls ly ma mg ml mr mu mw mz na ne ng om pk ps qa rw sa sd sl sn so st sy sz td tg tn tr tz ug ye yt za zm zw cn kp mn mo
    

    Surely it would make more sense to use a whitelist if you're blacklisting most of the world? That way you also don't need to add every new country or island that becomes independent.

    Depends on the objective. IP lists are never 100% accurate and sometimes it is preferable to get false-negatives (allowing some range that shouldn't be) than false-positives (blocking some range that shouldn't be). The config gives the option to flip if the number of rules is less.

    I'd assume that you'd have a lot of false positives either way when blocking most countries by Geo IP data. Guessing you either don't host anything that reaches a wide audience, or you serve via a CDN like CloudFlare so it doesn't matter.

  • dane_dohertydane_doherty Member
    edited April 2022

    @Cybr said:

    @tetech said:

    @Cybr said:

    @tetech said:

    ip_deny=am az bg by ge kg kz md ru tj tm ua uz ae af ao bf bh bi bj bw cd cf cg ci cm cv dj dz eg er et ga gh gm gn gq gw id il in io iq ir jo ke km kw lb lr ls ly ma mg ml mr mu mw mz na ne ng om pk ps qa rw sa sd sl sn so st sy sz td tg tn tr tz ug ye yt za zm zw cn kp mn mo
    

    Surely it would make more sense to use a whitelist if you're blacklisting most of the world? That way you also don't need to add every new country or island that becomes independent.

    Depends on the objective. IP lists are never 100% accurate and sometimes it is preferable to get false-negatives (allowing some range that shouldn't be) than false-positives (blocking some range that shouldn't be). The config gives the option to flip if the number of rules is less.

    I'd assume that you'd have a lot of false positives either way when blocking most countries by Geo IP data. Guessing you either don't host anything that reaches a wide audience, or you serve via a CDN like CloudFlare so it doesn't matter.

    When using Cloudflare, you're supposed to block everything except their official IP ranges. If you're not doing it, that kinda defeats the purpose.

    https://www.cloudflare.com/ips/

  • CybrCybr Member

    @dane_doherty said:

    @Cybr said:

    @tetech said:

    @Cybr said:

    @tetech said:

    ip_deny=am az bg by ge kg kz md ru tj tm ua uz ae af ao bf bh bi bj bw cd cf cg ci cm cv dj dz eg er et ga gh gm gn gq gw id il in io iq ir jo ke km kw lb lr ls ly ma mg ml mr mu mw mz na ne ng om pk ps qa rw sa sd sl sn so st sy sz td tg tn tr tz ug ye yt za zm zw cn kp mn mo
    

    Surely it would make more sense to use a whitelist if you're blacklisting most of the world? That way you also don't need to add every new country or island that becomes independent.

    Depends on the objective. IP lists are never 100% accurate and sometimes it is preferable to get false-negatives (allowing some range that shouldn't be) than false-positives (blocking some range that shouldn't be). The config gives the option to flip if the number of rules is less.

    I'd assume that you'd have a lot of false positives either way when blocking most countries by Geo IP data. Guessing you either don't host anything that reaches a wide audience, or you serve via a CDN like CloudFlare so it doesn't matter.

    When using Cloudflare, you're supposed to block everything except their official IP ranges. If you're not doing it, that kinda defeats the purpose.

    https://www.cloudflare.com/ips/

    When using CloudFlare, your web server should be configured to only respond to requests from CloudFlare, and the IP used should never be associated with anything related to the hosted site in the first place. That's different to blocking all access to the IP on a machine or network level.

  • dane_dohertydane_doherty Member
    edited April 2022

    @Cybr said: When using CloudFlare, your web server should be configured to only respond to requests from CloudFlare

    What does that mean exactly? Cloudflare's requests don't really have any characteristics that cannot be trivially spoofed. Spoofing TCP source address is out of reach for most people.

  • CybrCybr Member

    @dane_doherty said:

    @Cybr said: When using CloudFlare, your web server should be configured to only respond to requests from CloudFlare

    What does that mean exactly? Cloudflare's requests don't really have any characteristics that cannot be trivially spoofed. Spoofing TCP source address is out of reach for most people.

    Filtering by source IP is fine. I just meant you only need to restrict the web server to the CloudFlare source IP range, not the entire network interface. The restriction is primarily to prevent spiders and other scanners from discovering the undisclosed IP of the server and leaking it.

    Even better, you could have no web server listening on a public IP and create an outbound Argo tunnel to CloudFlare.

  • any example on blocking digitalocean ips?

  • kevindskevinds Member, LIR

    I don't block my country, I block based on traffic.. Number of honeypots and blacklists though.

    The biggest problem I had with country blocklists is every now, especially obscure Linux packages, are hosted there..

    Most of my blocklists are done at the network edge. Individual servers may have different blocklists, but I primarily deal with the network itself.

    SSH bots I just ignore.. Trying to brute-force the login, I don't really care.. They are not getting in.. Simply turning off SSH password authentication stopped most of them anyways.. SSH connection will ask for a username but disconnects before showing the password prompt.. They move on pretty quickly, the annoying systems are ones without the 'PasswordAuthentication no' option though.

    Thanked by 1bulbasaur
Sign In or Register to comment.