Block List of Ip Prefixes

I have a list of IP prefixes which I need to block on my site:
Here is a small sample:

34.80.0.0/15
34.137.0.0/16
35.185.128.0/19
35.185.160.0/20
35.187.144.0/20
35.189.160.0/19
35.194.128.0/17
35.201.128.0/17
35.206.192.0/18
35.220.32.0/21
35.221.128.0/17
34.125.0.0/16
35.219.128.0/18
2600:1900:4180::/44

I have looked at /admin/logs/screened_ip_addresses but there doesn’t seem to be any way to bulk add IP prefixes.

Is there any way I can do this?

Generally: such blocks should do via iptables and not let those reach the app in the first place. That is quite trivial job.

But the damn docker does everything so difficult. AFAIK docker kind of bypasses iptables and thats why it just doesn’t matter what we do on server lever. But could ./launcher enter app and then magic of iptables work?

1 Like