Skip to content

Instantly share code, notes, and snippets.

@peterc
Last active February 16, 2023 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterc/6fce570061cc179ff262791b0bc45adf to your computer and use it in GitHub Desktop.
Save peterc/6fce570061cc179ff262791b0bc45adf to your computer and use it in GitHub Desktop.
ufw rules to block abusive IP ranges in 2023
ufw insert 1 deny from 2.59.50.0/24 to any
ufw insert 1 deny from 5.183.130.0/24 to any
ufw insert 1 deny from 31.40.203.0/24 to any
ufw insert 1 deny from 45.11.20.0/23 to any
ufw insert 1 deny from 45.11.20.0/24 to any
ufw insert 1 deny from 45.11.21.0/24 to any
ufw insert 1 deny from 45.15.72.0/23 to any
ufw insert 1 deny from 45.15.72.0/24 to any
ufw insert 1 deny from 45.15.73.0/24 to any
ufw insert 1 deny from 45.15.236.0/23 to any
ufw insert 1 deny from 45.15.236.0/24 to any
ufw insert 1 deny from 45.15.237.0/24 to any
ufw insert 1 deny from 45.81.136.0/23 to any
ufw insert 1 deny from 45.81.136.0/24 to any
ufw insert 1 deny from 45.81.137.0/24 to any
ufw insert 1 deny from 45.84.176.0/23 to any
ufw insert 1 deny from 45.84.176.0/24 to any
ufw insert 1 deny from 45.84.177.0/24 to any
ufw insert 1 deny from 45.86.0.0/23 to any
ufw insert 1 deny from 45.86.0.0/24 to any
ufw insert 1 deny from 45.86.1.0/24 to any
ufw insert 1 deny from 45.87.252.0/23 to any
ufw insert 1 deny from 45.87.252.0/24 to any
ufw insert 1 deny from 45.87.253.0/24 to any
ufw insert 1 deny from 45.89.16.0/22 to any
ufw insert 1 deny from 45.89.16.0/23 to any
ufw insert 1 deny from 45.90.196.0/24 to any
ufw insert 1 deny from 45.134.180.0/22 to any
ufw insert 1 deny from 45.134.180.0/23 to any
ufw insert 1 deny from 45.134.182.0/23 to any
ufw insert 1 deny from 45.134.252.0/23 to any
ufw insert 1 deny from 45.134.252.0/24 to any
ufw insert 1 deny from 45.134.253.0/24 to any
ufw insert 1 deny from 45.135.32.0/23 to any
ufw insert 1 deny from 45.135.32.0/24 to any
ufw insert 1 deny from 45.135.33.0/24 to any
ufw insert 1 deny from 45.139.125.0/24 to any
ufw insert 1 deny from 45.139.176.0/23 to any
ufw insert 1 deny from 45.139.176.0/24 to any
ufw insert 1 deny from 45.139.177.0/24 to any
ufw insert 1 deny from 45.140.52.0/22 to any
ufw insert 1 deny from 45.140.52.0/23 to any
ufw insert 1 deny from 45.140.54.0/23 to any
ufw insert 1 deny from 45.142.252.0/23 to any
ufw insert 1 deny from 45.142.252.0/24 to any
ufw insert 1 deny from 45.142.253.0/24 to any
ufw insert 1 deny from 45.144.36.0/24 to any
ufw insert 1 deny from 45.145.116.0/22 to any
ufw insert 1 deny from 45.145.116.0/23 to any
ufw insert 1 deny from 45.145.118.0/23 to any
ufw insert 1 deny from 45.147.192.0/23 to any
ufw insert 1 deny from 45.147.192.0/24 to any
ufw insert 1 deny from 45.147.193.0/24 to any
ufw insert 1 deny from 45.151.145.0/24 to any
ufw insert 1 deny from 46.8.10.0/23 to any
ufw insert 1 deny from 46.8.10.0/24 to any
ufw insert 1 deny from 46.8.11.0/24 to any
ufw insert 1 deny from 46.8.14.0/23 to any
ufw insert 1 deny from 46.8.14.0/24 to any
ufw insert 1 deny from 46.8.15.0/24 to any
ufw insert 1 deny from 46.8.16.0/23 to any
ufw insert 1 deny from 46.8.16.0/24 to any
ufw insert 1 deny from 46.8.17.0/24 to any
ufw insert 1 deny from 46.8.22.0/23 to any
ufw insert 1 deny from 46.8.22.0/24 to any
ufw insert 1 deny from 46.8.23.0/24 to any
ufw insert 1 deny from 46.8.56.0/23 to any
ufw insert 1 deny from 46.8.56.0/24 to any
ufw insert 1 deny from 46.8.57.0/24 to any
ufw insert 1 deny from 46.8.106.0/23 to any
ufw insert 1 deny from 46.8.106.0/24 to any
ufw insert 1 deny from 46.8.107.0/24 to any
ufw insert 1 deny from 46.8.110.0/24 to any
ufw insert 1 deny from 46.8.111.0/24 to any
ufw insert 1 deny from 46.8.154.0/23 to any
ufw insert 1 deny from 46.8.154.0/24 to any
ufw insert 1 deny from 46.8.155.0/24 to any
ufw insert 1 deny from 46.8.156.0/23 to any
ufw insert 1 deny from 46.8.156.0/24 to any
ufw insert 1 deny from 46.8.157.0/24 to any
ufw insert 1 deny from 46.8.192.0/23 to any
ufw insert 1 deny from 46.8.192.0/24 to any
ufw insert 1 deny from 46.8.193.0/24 to any
ufw insert 1 deny from 46.8.212.0/23 to any
ufw insert 1 deny from 46.8.212.0/24 to any
ufw insert 1 deny from 46.8.213.0/24 to any
ufw insert 1 deny from 46.8.222.0/23 to any
ufw insert 1 deny from 46.8.222.0/24 to any
ufw insert 1 deny from 46.8.223.0/24 to any
ufw insert 1 deny from 77.83.84.0/24 to any
ufw insert 1 deny from 77.83.148.0/23 to any
ufw insert 1 deny from 77.83.148.0/24 to any
ufw insert 1 deny from 77.83.149.0/24 to any
ufw insert 1 deny from 77.94.1.0/24 to any
ufw insert 1 deny from 84.54.53.0/24 to any
ufw insert 1 deny from 91.188.244.0/24 to any
ufw insert 1 deny from 92.119.193.0/24 to any
ufw insert 1 deny from 94.158.190.0/24 to any
ufw insert 1 deny from 95.182.124.0/23 to any
ufw insert 1 deny from 95.182.124.0/24 to any
ufw insert 1 deny from 95.182.125.0/24 to any
ufw insert 1 deny from 95.182.126.0/23 to any
ufw insert 1 deny from 95.182.126.0/24 to any
ufw insert 1 deny from 95.182.127.0/24 to any
ufw insert 1 deny from 109.248.12.0/23 to any
ufw insert 1 deny from 109.248.12.0/24 to any
ufw insert 1 deny from 109.248.13.0/24 to any
ufw insert 1 deny from 109.248.14.0/23 to any
ufw insert 1 deny from 109.248.14.0/24 to any
ufw insert 1 deny from 109.248.15.0/24 to any
ufw insert 1 deny from 109.248.48.0/23 to any
ufw insert 1 deny from 109.248.48.0/24 to any
ufw insert 1 deny from 109.248.49.0/24 to any
ufw insert 1 deny from 109.248.54.0/23 to any
ufw insert 1 deny from 109.248.54.0/24 to any
ufw insert 1 deny from 109.248.55.0/24 to any
ufw insert 1 deny from 109.248.128.0/23 to any
ufw insert 1 deny from 109.248.128.0/24 to any
ufw insert 1 deny from 109.248.129.0/24 to any
ufw insert 1 deny from 109.248.138.0/23 to any
ufw insert 1 deny from 109.248.138.0/24 to any
ufw insert 1 deny from 109.248.139.0/24 to any
ufw insert 1 deny from 109.248.142.0/23 to any
ufw insert 1 deny from 109.248.142.0/24 to any
ufw insert 1 deny from 109.248.143.0/24 to any
ufw insert 1 deny from 109.248.166.0/23 to any
ufw insert 1 deny from 109.248.166.0/24 to any
ufw insert 1 deny from 109.248.167.0/24 to any
ufw insert 1 deny from 109.248.204.0/23 to any
ufw insert 1 deny from 109.248.204.0/24 to any
ufw insert 1 deny from 109.248.205.0/24 to any
ufw insert 1 deny from 176.53.186.0/24 to any
ufw insert 1 deny from 185.181.244.0/23 to any
ufw insert 1 deny from 185.181.244.0/24 to any
ufw insert 1 deny from 185.181.245.0/24 to any
ufw insert 1 deny from 185.181.246.0/23 to any
ufw insert 1 deny from 185.181.246.0/24 to any
ufw insert 1 deny from 185.181.247.0/24 to any
ufw insert 1 deny from 188.130.128.0/23 to any
ufw insert 1 deny from 188.130.128.0/24 to any
ufw insert 1 deny from 188.130.129.0/24 to any
ufw insert 1 deny from 188.130.136.0/23 to any
ufw insert 1 deny from 188.130.136.0/24 to any
ufw insert 1 deny from 188.130.137.0/24 to any
ufw insert 1 deny from 188.130.142.0/23 to any
ufw insert 1 deny from 188.130.142.0/24 to any
ufw insert 1 deny from 188.130.143.0/24 to any
ufw insert 1 deny from 188.130.184.0/23 to any
ufw insert 1 deny from 188.130.184.0/24 to any
ufw insert 1 deny from 188.130.185.0/24 to any
ufw insert 1 deny from 188.130.186.0/23 to any
ufw insert 1 deny from 188.130.186.0/24 to any
ufw insert 1 deny from 188.130.187.0/24 to any
ufw insert 1 deny from 188.130.188.0/23 to any
ufw insert 1 deny from 188.130.188.0/24 to any
ufw insert 1 deny from 188.130.189.0/24 to any
ufw insert 1 deny from 188.130.210.0/23 to any
ufw insert 1 deny from 188.130.210.0/24 to any
ufw insert 1 deny from 188.130.211.0/24 to any
ufw insert 1 deny from 188.130.218.0/23 to any
ufw insert 1 deny from 188.130.218.0/24 to any
ufw insert 1 deny from 188.130.219.0/24 to any
ufw insert 1 deny from 188.130.220.0/23 to any
ufw insert 1 deny from 188.130.220.0/24 to any
ufw insert 1 deny from 188.130.221.0/24 to any
ufw insert 1 deny from 192.144.31.0/24 to any
ufw insert 1 deny from 193.53.168.0/24 to any
ufw insert 1 deny from 193.58.168.0/23 to any
ufw insert 1 deny from 193.58.168.0/24 to any
ufw insert 1 deny from 193.58.169.0/24 to any
ufw insert 1 deny from 194.32.229.0/24 to any
ufw insert 1 deny from 194.32.237.0/24 to any
ufw insert 1 deny from 194.34.248.0/24 to any
ufw insert 1 deny from 194.35.113.0/24 to any
ufw insert 1 deny from 194.156.92.0/24 to any
ufw insert 1 deny from 194.156.96.0/23 to any
ufw insert 1 deny from 194.156.96.0/24 to any
ufw insert 1 deny from 194.156.97.0/24 to any
ufw insert 1 deny from 194.156.123.0/24 to any
ufw insert 1 deny from 212.115.49.0/24 to any
ufw insert 1 deny from 213.226.101.0/24 to any
ufw insert 1 deny from 23.228.75.130/32 to any
ufw insert 1 deny from 23.228.75.132/30 to any
ufw insert 1 deny from 23.228.75.136/30 to any
ufw insert 1 deny from 23.228.75.140/31 to any
ufw insert 1 deny from 23.228.75.142/32 to any
ufw insert 1 deny from 23.228.82.230/31 to any
ufw insert 1 deny from 23.228.82.232/30 to any
ufw insert 1 deny from 23.228.82.236/31 to any
ufw insert 1 deny from 23.228.82.238/32 to any
ufw insert 1 deny from 23.228.82.240/29 to any
ufw insert 1 deny from 23.228.82.248/31 to any
ufw insert 1 deny from 23.228.84.226/31 to any
ufw insert 1 deny from 23.228.84.228/30 to any
ufw insert 1 deny from 23.228.84.232/29 to any
ufw insert 1 deny from 23.228.84.240/30 to any
ufw insert 1 deny from 23.230.212.201/32 to any
ufw insert 1 deny from 23.230.221.57/32 to any
ufw insert 1 deny from 23.230.221.156/32 to any
ufw insert 1 deny from 45.39.49.46/32 to any
ufw insert 1 deny from 64.93.84.37/32 to any
ufw insert 1 deny from 64.93.84.196/32 to any
ufw insert 1 deny from 64.93.85.25/32 to any
ufw insert 1 deny from 64.93.85.176/32 to any
ufw insert 1 deny from 64.93.86.242/32 to any
ufw insert 1 deny from 64.93.87.73/32 to any
ufw insert 1 deny from 64.93.87.236/32 to any
ufw insert 1 deny from 104.148.34.194/31 to any
ufw insert 1 deny from 104.148.34.196/30 to any
ufw insert 1 deny from 104.148.34.200/30 to any
ufw insert 1 deny from 104.148.80.84/32 to any
ufw insert 1 deny from 104.148.80.86/31 to any
ufw insert 1 deny from 104.148.80.88/30 to any
ufw insert 1 deny from 104.148.80.92/31 to any
ufw insert 1 deny from 107.179.117.236/30 to any
ufw insert 1 deny from 107.179.117.241/32 to any
ufw insert 1 deny from 107.179.117.242/32 to any
ufw insert 1 deny from 107.179.117.244/30 to any
ufw insert 1 deny from 107.179.117.249/32 to any
ufw insert 1 deny from 107.179.117.250/31 to any
ufw insert 1 deny from 107.179.117.252/31 to any
ufw insert 1 deny from 107.179.117.254/32 to any
ufw insert 1 deny from 107.186.67.221/32 to any
ufw insert 1 deny from 107.187.127.213/32 to any
ufw insert 1 deny from 114.143.194.38/32 to any
ufw insert 1 deny from 134.73.85.26/31 to any
ufw insert 1 deny from 134.73.130.98/31 to any
ufw insert 1 deny from 134.73.130.100/30 to any
ufw insert 1 deny from 134.73.130.104/30 to any
ufw insert 1 deny from 134.73.130.108/31 to any
ufw insert 1 deny from 134.73.130.110/32 to any
ufw insert 1 deny from 134.73.181.50/32 to any
ufw insert 1 deny from 134.73.181.53/32 to any
ufw insert 1 deny from 134.73.183.186/31 to any
ufw insert 1 deny from 134.73.183.188/31 to any
ufw insert 1 deny from 134.73.183.190/32 to any
ufw insert 1 deny from 134.73.209.194/31 to any
ufw insert 1 deny from 134.73.209.196/30 to any
ufw insert 1 deny from 134.73.209.200/30 to any
ufw insert 1 deny from 134.73.209.204/31 to any
ufw insert 1 deny from 134.73.209.207/32 to any
ufw insert 1 deny from 134.73.209.208/32 to any
ufw insert 1 deny from 134.73.209.219/32 to any
ufw insert 1 deny from 134.73.209.220/31 to any
ufw insert 1 deny from 134.73.209.222/32 to any
ufw insert 1 deny from 134.73.252.50/31 to any
ufw insert 1 deny from 134.73.252.52/30 to any
ufw insert 1 deny from 134.73.252.61/32 to any
ufw insert 1 deny from 134.73.252.62/32 to any
ufw insert 1 deny from 134.73.255.98/32 to any
ufw insert 1 deny from 134.73.255.104/32 to any
ufw insert 1 deny from 134.73.255.108/32 to any
ufw insert 1 deny from 134.73.255.110/31 to any
ufw insert 1 deny from 134.73.255.113/32 to any
ufw insert 1 deny from 134.73.255.114/31 to any
ufw insert 1 deny from 134.73.255.116/30 to any
ufw insert 1 deny from 134.73.255.120/31 to any
ufw insert 1 deny from 134.73.255.124/31 to any
ufw insert 1 deny from 136.0.45.120/32 to any
ufw insert 1 deny from 142.202.205.212/32 to any
ufw insert 1 deny from 151.248.84.143/32 to any
ufw insert 1 deny from 151.248.85.17/32 to any
ufw insert 1 deny from 151.248.85.209/32 to any
ufw insert 1 deny from 151.248.86.72/32 to any
ufw insert 1 deny from 151.248.86.109/32 to any
ufw insert 1 deny from 151.248.87.239/32 to any
ufw insert 1 deny from 157.52.139.0/24 to any
ufw insert 1 deny from 157.52.194.0/24 to any
ufw insert 1 deny from 157.52.228.66/32 to any
ufw insert 1 deny from 157.52.231.98/31 to any
ufw insert 1 deny from 157.52.231.122/31 to any
ufw insert 1 deny from 157.52.231.124/31 to any
ufw insert 1 deny from 157.52.231.126/32 to any
ufw insert 1 deny from 157.52.240.0/24 to any
ufw insert 1 deny from 159.65.115.69/32 to any
ufw insert 1 deny from 182.160.110.170/32 to any
ufw insert 1 deny from 192.169.6.149/32 to any
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment