Skip to content

Instantly share code, notes, and snippets.

@inertia186
Last active December 15, 2015 05:19
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 inertia186/5208273 to your computer and use it in GitHub Desktop.
Save inertia186/5208273 to your computer and use it in GitHub Desktop.
If you're setting up a pf (packet filter) firewall, here's the Minecraft specific DDoS threats file we currently use.
70.71.153.43
111.197.56.176
111.197.63.35
114.250.244.70
203.171.233.243
221.219.250.74
65.125.155.90
85.227.160.171
204.14.77.46
174.134.89.68
5.69.203.227
204.14.77.65
173.245.67.148
109.148.190.249
84.193.193.35
173.216.10.64
72.200.128.154
24.129.227.177
94.3.146.10
75.100.149.242
71.143.228.73
94.158.111.63
174.61.103.165
202.114.205.125
202.38.95.66
37.24.154.239
58.218.185.113
68.42.26.17
91.201.190.186
02.114.205.125
202.198.17.141
222.174.163.2
58.57.24.177
61.138.104.30
61.166.55.153
75.141.195.113
76.30.100.235
82.243.11.169
93.77.17.11
178.151.179.14
67.165.194.246
92.53.104.238
116.255.164.18
186.202.120.49
198.144.156.248
2.24.73.45
211.108.62.230
59.21.114.99
69.251.80.238
92.241.108.193
62.226.14.194
108.33.29.70
174.60.56.128
176.36.61.106
221.176.65.10
221.84.255.26
46.118.235.121
64.131.203.43
66.177.128.228
68.150.44.103
72.95.34.14
75.189.238.131
76.97.214.250
77.47.207.111
93.115.204.208
94.76.216.190
219.243.220.100
202.112.50.140
46.37.209.49
97.88.206.157
188.32.107.120
213.109.84.73
219.243.221.77
24.236.198.115
1.214.208.114
108.249.17.215
109.163.233.200
109.195.23.55
110.164.68.138
110.46.243.228
115.236.19.238
116.112.64.226
116.226.213.7
116.255.137.136
116.255.138.238
117.34.72.51
118.244.169.69
120.72.84.212
121.14.153.190
121.14.155.106
121.6.53.179
121.8.152.242
122.194.11.208
122.225.202.18
123.196.117.191
123.30.188.46
125.88.125.201
146.115.61.107
146.90.18.115
159.224.85.113
162.105.25.123
173.177.242.48
173.200.245.186
173.28.154.210
173.45.125.156
173.63.61.89
176.8.75.20
178.121.221.226
178.150.156.219
178.169.97.35
178.254.116.194
18.187.1.68
180.149.96.69
182.237.182.124
182.71.176.51
184.65.125.2
184.72.161.60
184.76.108.200
184.89.45.240
185.2.12.77
188.75.223.43
190.39.69.24
192.137.21.157
195.1.89.66
195.122.254.9
195.46.185.37
198.144.187.74
199.66.81.83
2.70.41.50
200.93.157.242
201.212.0.161
202.101.209.219
202.112.126.88
202.112.50.88
202.113.65.229
202.118.250.234
202.118.64.14
202.96.137.107
202.96.33.216
203.110.161.70
204.210.137.98
207.181.205.199
209.190.33.13
209.236.119.75
210.75.15.14
212.14.232.90
212.49.70.48
213.141.144.39
216.176.124.176
217.208.15.218
218.107.132.66
218.91.154.195
220.162.14.114
220.174.209.178
220.248.101.110
220.88.76.197
222.197.188.39
222.197.214.91
222.73.25.71
24.128.161.237
24.149.126.180
24.154.27.166
24.193.87.149
24.30.30.135
24.32.108.8
37.59.124.216
46.180.31.196
46.181.213.133
46.236.147.67
5.43.160.134
50.136.143.52
51.217.95.26
58.211.138.27
58.215.81.185
58.218.185.86
59.11.237.151
59.37.168.16
59.60.7.146
60.190.189.214
61.131.11.52
61.147.79.111
61.160.200.95
61.163.231.164
61.40.132.114
62.243.224.180
64.131.249.119
66.189.10.40
67.160.173.66
68.116.120.205
68.147.219.207
68.194.39.143
68.55.148.148
68.83.187.16
69.242.38.3
69.248.129.18
71.184.245.5
71.195.146.249
71.38.2.156
74.197.228.101
74.243.243.90
75.75.52.0
76.106.80.137
76.120.135.104
76.125.166.70
76.30.139.203
77.37.225.171
77.50.0.133
78.111.247.217
78.171.111.34
78.234.198.110
8.211.195.86
80.167.238.77
80.213.150.135
80.63.56.147
81.167.71.82
81.24.210.76
81.48.237.220
82.157.112.187
82.196.122.14
84.248.158.194
84.41.99.142
84.89.45.240
85.24.185.215
85.24.189.176
86.10.107.142
89.20.159.93
91.236.74.103
92.137.21.157
94.194.103.90
94.242.15.24
94.38.0.0/16
95.173.32.69
95.31.22.160
96.44.189.100
96.47.226.21
98.154.55.224
98.202.2.109
98.211.149.208
98.225.212.73
98.238.93.65
98.242.146.151
99.23.210.27
99.66.81.83
@inertia186
Copy link
Author

A pf anchor divides up filter rules into functional groups. Edit your /etc/pf.conf file to include the following lines:

anchor "minecraft-ddos-threats"
load anchor "minecraft-ddos-threats" from "/etc/pf.anchors/minecraft-ddos-threats"

Now we need to write the lines for the anchor we defined. From the /etc/pf.conf configuration we just added, those should go into the file /etc/pf.anchors/minecraft-ddos-threats. Create that file and add these lines:

table <minecraft_ddos_threats> persist file "/etc/minecraft-ddos-Block-IPs.txt"
block log from <minecraft_ddos_threats> to any

The first line establishes a table called minecraft_ddos_threats and on an initial start will load the contents of the /etc/minecraft-ddos-Block-IPs.txt file.

The second line is the filter rule that blocks and logs from any IP address or network listed in the minecraft_ddos_threats table. If you are not interested in logging the packets that are dropped, just leave out the log keyword.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment