I personally use nginx-ultimate-bad-bot-blocker but also custom IP ranges (the entirety of Israel plus GAFAM), and fail2ban.

I saw a dramatic drop in scraper-related traffic, although I still have some offenders trying to access (and failing in doing so).

Which solution do you use?

  • BlueÆther@no.lastname.nz
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 hours ago

    I do the following in order:

    • geoblock China (and some other Asia blocks) and South America via Caddy file
    • Useraget block lists
    • Tarpit any other suspicious via iocane

    Cut impressions from over 200/sec to ~6-8 average

      • BlueÆther@no.lastname.nz
        link
        fedilink
        English
        arrow-up
        1
        ·
        57 minutes ago
        {$LEMMY_HOSTNAME} {
                import caddy-common
        
                ######################################
                ########## log files        ##########
                log cn_blocked {
                        output file /data/cn-blocked.log
                        format json
                        no_hostname
                }
        
                ########## iocaine  code ##########
                @read method GET HEAD
                        reverse_proxy @read host.docker.internal:42069 {
                        @fallback status 421
                        handle_response @fallback
                }
        
                ########## cn blocking code ##########
                @blocked {
                        remote_ip 1.0.1.0/24 1.0.2.0/23 1.0.8.0/21 1.0.32.0/19 1.1.0.0/24 1.1.2.0/23 1.1.4.0/22 1.1.8.0/21 1.1.16.0/20 1.1.32.0/19 1.2.0.0/23 1.2.2.0/24 1.2.4.0/22 1.2.>
                        remote_ip 43.254.248.0/21 43.255.0.0/21 43.255.8.0/22 43.255.16.0/22 43.255.48.0/22 43.255.64.0/20 43.255.84.0/22 43.255.96.0/22 43.255.144.0/22 43.255.176.0/22>
                        remote_ip 103.8.8.0/22 103.8.32.0/22 103.8.52.0/22 103.8.68.0/22 103.8.108.0/22 103.8.156.0/22 103.8.200.0/21 103.8.220.0/22 103.9.8.0/22 103.9.24.0/22 103.9.10>
                        remote_ip 103.72.128.0/21 103.72.148.0/22 103.72.172.0/22 103.72.180.0/22 103.72.224.0/19 103.73.0.0/19 103.73.48.0/22 103.73.116.0/22 103.73.120.0/22 103.73.12>
                        remote_ip 103.132.112.0/21 103.132.120.0/22 103.132.160.0/21 103.132.188.0/22 103.132.208.0/21 103.132.234.0/23 103.133.12.0/22 103.133.40.0/22 103.133.128.0/22>
                        remote_ip 103.216.16.0/20 103.216.32.0/20 103.216.64.0/22 103.216.108.0/22 103.216.136.0/22 103.216.152.0/22 103.216.156.0/23 103.216.224.0/21 103.216.240.0/20 >
                        remote_ip 114.68.0.0/16 114.79.64.0/18 114.80.0.0/12 114.96.0.0/13 114.104.0.0/14 114.110.0.0/20 114.110.64.0/18 114.111.0.0/19 114.111.160.0/19 114.112.0.0/14 >
                        remote_ip 125.214.96.0/19 125.215.0.0/18 125.216.0.0/13 125.254.128.0/17 128.108.0.0/16 129.28.0.0/16 129.204.0.0/16 129.211.0.0/16 132.232.0.0/16 134.175.0.0/1>
                        remote_ip 202.9.34.0/23 202.9.48.0/23 202.9.51.0/24 202.9.52.0/23 202.9.54.0/24 202.9.57.0/24 202.9.58.0/23 202.10.64.0/20 202.10.112.0/20 202.12.1.0/24 202.12.>
                        remote_ip 203.6.150.0/23 203.6.157.0/24 203.6.159.0/24 203.6.224.0/20 203.6.248.0/23 203.7.129.0/24 203.7.138.0/23 203.7.147.0/24 203.7.150.0/23 203.7.158.0/24 >
                        remote_ip 203.31.85.0/24 203.31.97.0/24 203.31.105.0/24 203.31.106.0/24 203.31.108.0/23 203.31.124.0/24 203.31.162.0/24 203.31.174.0/24 203.31.177.0/24 203.31.1>
                        remote_ip 223.208.0.0/13 223.220.0.0/15 223.223.176.0/20 223.223.192.0/20 223.240.0.0/13 223.248.0.0/14 223.252.128.0/17 223.254.0.0/16 223.255.0.0/17 223.255.2>
                }
        
                route @blocked {
        #               log_name cn_blocked
                        respond "<h1>Access Denied</h1>" 403
                }
                ##########   cn block ends  ##########
                ######################################