# Block server ip COD cold war

**URL:** <https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640>\
**Category:** Network and Wireless Configuration\
**Created:** [March 30, 2021, 12:00pm UTC](https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640 "2021-03-30T12:00:44Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon78773196](https://forum.openwrt.org/letter_avatar/anon78773196/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon78773196](https://forum.openwrt.org/u/anon78773196)\
**Post date:** [March 30, 2021, 12:00pm UTC](https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640/1 "2021-03-30T12:00:44Z")

</div>

hello everybody i would like block server of call of duty who are so long of my home

i use ipset for block

i'm in france this is my list for cold war but i'm note sure,

i has keep only server france and deutch

```
iptables -A INPUT -s 108.61.97.45 -j DROP
iptables -A INPUT -s 107.6.150.82 -j DROP
iptables -A INPUT -s 95.177.146.31 -j DROP
iptables -A INPUT -s 35.172.121.239 -j DROP
iptables -A INPUT -s 69.36.183.72 -j DROP
iptables -A INPUT -s 69.36.183.65 -j DROP
iptables -A INPUT -s 52.73.176.44 -j DROP
iptables -A INPUT -s 3.17.59.170 -j DROP
iptables -A INPUT -s 3.131.160.203 -j DROP
iptables -A INPUT -s 199.116.113.145 -j DROP
iptables -A INPUT -s 199.116.113.137 -j DROP
iptables -A INPUT -s 108.61.125.17 -j DROP
iptables -A INPUT -s 104.238.139.26 -j DROP
iptables -A INPUT -s 108.61.232.39 -j DROP
iptables -A INPUT -s 24.105.52.245 -j DROP
iptables -A INPUT -s 24.105.52.197 -j DROP
iptables -A INPUT -s 96.30.208.246 -j DROP
iptables -A INPUT -s 148.72.173.73 -j DROP
iptables -A INPUT -s 148.72.171.171 -j DROP
iptables -A INPUT -s 66.42.88.254 -j DROP
iptables -A INPUT -s 63.251.239.116 -j DROP
iptables -A INPUT -s 107.6.97.26 -j DROP
iptables -A INPUT -s 15.185.42.136 -j DROP
iptables -A INPUT -s 216.24.138.13 -j DROP
iptables -A INPUT -s 35.206.120.112 -j DROP
iptables -A INPUT -s 107.182.238.164 -j DROP
iptables -A INPUT -s 209.95.32.78 -j DROP
iptables -A INPUT -s 35.215.77.57 -j DROP
iptables -A INPUT -s 45.76.73.126 -j DROP
iptables -A INPUT -s 45.76.73.121 -j DROP
iptables -A INPUT -s 35.215.95.255 -j DROP
iptables -A INPUT -s 142.54.238.28 -j DROP
iptables -A INPUT -s 149.248.40.218 -j DROP
iptables -A INPUT -s 149.248.41.58 -j DROP
iptables -A INPUT -s 197.84.209.6 -j DROP
iptables -A INPUT -s 197.80.200.85 -j DROP 
iptables -A INPUT -s 167.179.122.184 -j DROP
iptables -A INPUT -s 34.92.238.253 -j DROP
iptables -A INPUT -s 149.28.184.250 -j DROP
iptables -A INPUT -s 37.244.43.242 -j DROP
iptables -A INPUT -s 37.244.43.207 -j DROP
iptables -A INPUT -s 103.198.33.230 -j DROP
iptables -A INPUT -s 24.105.53.42 -j DROP
iptables -A INPUT -s 173.199.67.209 -j DROP
iptables -A INPUT -s 45.63.72.250 -j DROP
iptables -A INPUT -s 85.195.94.137 -j DROP
iptables -A INPUT -s 45.76.44.80 -j DROP
iptables -A INPUT -s 45.63.80.223 -j DROP
iptables -A INPUT -s 95.179.205.202 -j DROP
iptables -A INPUT -s 82.145.63.98 -j DROP
iptables -A INPUT -s 104.156.235.232 -j DROP
iptables -A INPUT -s 197.80.200.115 -j DROP
iptables -A INPUT -s 189.1.164.26 -j DROP
iptables -A INPUT -s 95.177.146.86 -j DROP
iptables -A INPUT -s 197.84.209.37 -j DROP
iptables -A INPUT -s 95.179.204.207 -j DROP
iptables -A INPUT -s 92.204.186.91 -j DROP
iptables -A INPUT -s 149.28.185.153 -j DROP
iptables -A INPUT -s 78.129.190.142 -j DROP
iptables -A INPUT -s 189.1.170.82 -j DROP
iptables -A INPUT -s 66.203.113.28 -j DROP
iptables -A INPUT -s 85.195.124.107 -j DROP
iptables -A INPUT -s 172.83.41.225 -j DROP
iptables -A INPUT -s 108.61.36.46 -j DROP
iptables -A INPUT -s 66.42.47.209 -j DROP
iptables -A INPUT -s 66.203.113.33 -j DROP
iptables -A INPUT -s 95.141.35.195 -j DROP
iptables -A INPUT -s 45.63.113.249 -j DROP
iptables -A INPUT -s 149.28.216.213 -j DROP
iptables -A INPUT -s 34.92.135.0 -j DROP
iptables -A INPUT -s 172.83.41.215 -j DROP
iptables -A INPUT -s 108.61.133.177 -j DROP
iptables -A INPUT -s 66.42.88.248 -j DROP
iptables -A INPUT -s 139.180.151.207 -j DROP
iptables -A INPUT -s 173.199.67.98 -j DROP

```

not sure to efficace 100%

thanks

---

<div class="post-metadata">

**Author:** ![frollic](https://forum.openwrt.org/user_avatar/forum.openwrt.org/frollic/32/30113_2.png) [@frollic](https://forum.openwrt.org/u/frollic)\
**Post date:** [March 30, 2021, 12:03pm UTC](https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640/2 "2021-03-30T12:03:08Z")

</div>

are you blocking connections from, or connections to ?

---

<div class="post-metadata">

**Author:** ![anon78773196](https://forum.openwrt.org/letter_avatar/anon78773196/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon78773196](https://forum.openwrt.org/u/anon78773196)\
**Post date:** [March 30, 2021, 1:10pm UTC](https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640/3 "2021-03-30T13:10:07Z")

</div>

connection from

my game is low ping normally everytime

---

<div class="post-metadata">

**Author:** ![frollic](https://forum.openwrt.org/user_avatar/forum.openwrt.org/frollic/32/30113_2.png) [@frollic](https://forum.openwrt.org/u/frollic)\
**Post date:** [March 30, 2021, 1:13pm UTC](https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640/4 "2021-03-30T13:13:06Z")

</div>

if you're blocking connections _from_ the server, shouldn't you block everything,  
and just allow those you want to use ?

---

<div class="post-metadata">

**Author:** ![anon78773196](https://forum.openwrt.org/letter_avatar/anon78773196/32/5_5575768a8748004e209b776fc1b2916d.png) [@anon78773196](https://forum.openwrt.org/u/anon78773196)\
**Post date:** [March 30, 2021, 1:14pm UTC](https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640/5 "2021-03-30T13:14:36Z")

</div>

i don't know

just i know than the server is not on my list via wireshark

for the moment i'm on test

---

<div class="post-metadata">

**Author:** ![vgaetera](https://forum.openwrt.org/user_avatar/forum.openwrt.org/vgaetera/32/113586_2.png) [@vgaetera](https://forum.openwrt.org/u/vgaetera)\
**Post date:** [March 30, 2021, 1:18pm UTC](https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640/6 "2021-03-30T13:18:59Z")

</div>

> [@banIP support thread](https://forum.openwrt.org/t/banip-support-thread/16985):
>
> Hi, in OpenWrt snapshot package repo you'll find the banIP package: stable OpenWrt version 23.05.x.: [banIP 0.9.3-4](https://downloads.openwrt.org/releases/packages-23.05/x86_64/packages/) plus [luci companion package](https://downloads.openwrt.org/releases/packages-23.05/x86_64/luci/) latest snapshot version: [banIP 0.9.3-4](https://downloads.openwrt.org/snapshots/packages/x86_64/packages/) plus [luci companion package](https://downloads.openwrt.org/snapshots/packages/x86_64/luci/) Link to the latest [banIP documentation](https://github.com/openwrt/packages/blob/master/net/banip/files/README.md) Feel free to test, ask questions or make suggestions. 
> 
> > **Changelog**
> >
> > --- update 0.9.3-4 made the default mail template "responsive" to get a better view esp. on mobile devices --- update 0.9.3-3 more init fixes --- update 0.9.3-…

---

<div class="post-metadata">

**Author:** ![dlakelan](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dlakelan/32/2320_2.png) [@dlakelan](https://forum.openwrt.org/u/dlakelan)\
**Post date:** [March 30, 2021, 1:19pm UTC](https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640/7 "2021-03-30T13:19:21Z")

</div>

Use ipset it will be faster and easier to change.

---

<div class="post-metadata">

**Author:** ![tievolu](https://forum.openwrt.org/letter_avatar/tievolu/32/5_5575768a8748004e209b776fc1b2916d.png) [@tievolu](https://forum.openwrt.org/u/tievolu)\
**Post date:** [March 30, 2021, 2:38pm UTC](https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640/8 "2021-03-30T14:38:03Z")

</div>

Agreed. An `ipset` is the way to go. The OP says they're using ipset, but the long list of rules for each source IP says otherwise.

Also, if these rules are on the router they need to be added to the `FORWARD` chain, not the `INPUT` chain.

`FORWARD` = packets forwarded from `WAN->LAN` or `LAN->WAN`  
`INPUT` = packets destined for the router itself

Something like this:

```
ipset -exist create ips-codservers hash:ip
ipset -exist flush ips-codservers
ipset add ips-codservers 108.61.97.45
ipset add ips-codservers 107.6.150.82
ipset add ips-codservers 95.177.146.31 
ipset add ips-codservers 35.172.121.239
...

iptables -t filter -A FORWARD -p tcp -m set --match-set ips-codservers src -j DROP
iptables -t filter -A FORWARD -p udp -m set --match-set ips-codservers src -j DROP
iptables -t filter -A FORWARD -p tcp -m set --match-set ips-codservers dst -j DROP
iptables -t filter -A FORWARD -p udp -m set --match-set ips-codservers dst -j DROP

```

You could use OpenWrt's `forwarding_rule` chain instead of `FORWARD`, which is probably neater in the long run:

```
iptables -t filter -A forwarding_rule -p tcp -m set --match-set ips-codservers src -j DROP
iptables -t filter -A forwarding_rule -p udp -m set --match-set ips-codservers src -j DROP
iptables -t filter -A forwarding_rule -p tcp -m set --match-set ips-codservers dst -j DROP
iptables -t filter -A forwarding_rule -p udp -m set --match-set ips-codservers dst -j DROP

```

Then if you need to add/remove server IPs you just modify the `ips-codservers` ipset instead of having to edit the rules and restart/reload the firewall.

---

<div class="post-metadata">

**Author:** ![lleachii](https://forum.openwrt.org/letter_avatar/lleachii/32/5_5575768a8748004e209b776fc1b2916d.png) [@lleachii](https://forum.openwrt.org/u/lleachii)\
**Post date:** [March 30, 2021, 3:04pm UTC](https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640/9 "2021-03-30T15:04:56Z")

</div>

- If you block the servers, how do you intend to play the game?
- These don't appear to be servers; but gamers...are you blocking valid users form playing with you???
- Some IPs seem unrelated to gaming whatsoever, why do you think these are gaming servers?

---

<div class="post-metadata">

**Author:** ![dlakelan](https://forum.openwrt.org/user_avatar/forum.openwrt.org/dlakelan/32/2320_2.png) [@dlakelan](https://forum.openwrt.org/u/dlakelan)\
**Post date:** [March 30, 2021, 3:19pm UTC](https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640/10 "2021-03-30T15:19:39Z")

</div>

> [@lleachii](#):
>
> If you block the servers, how do you intend to play the game?

I think the idea is to block servers that perform poorly or are too far away (high ping).

---

<div class="post-metadata">

**Author:** ![lleachii](https://forum.openwrt.org/letter_avatar/lleachii/32/5_5575768a8748004e209b776fc1b2916d.png) [@lleachii](https://forum.openwrt.org/u/lleachii)\
**Post date:** [March 30, 2021, 3:21pm UTC](https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640/11 "2021-03-30T15:21:49Z")

</div>

> [@dlakelan](#):
>
> the idea is to block servers that perform poorly or are too far away (high ping).

> [@lleachii](#):
>
> These don't appear to be servers; but gamers

> [@lleachii](#):
>
> Some IPs seem unrelated to gaming whatsoever

- Look at some of the IPs

---

<div class="post-metadata">

**Author:** ![tievolu](https://forum.openwrt.org/letter_avatar/tievolu/32/5_5575768a8748004e209b776fc1b2916d.png) [@tievolu](https://forum.openwrt.org/u/tievolu)\
**Post date:** [March 30, 2021, 3:22pm UTC](https://forum.openwrt.org/t/block-server-ip-cod-cold-war/92640/12 "2021-03-30T15:22:26Z")

</div>

I think it will probably to be pretty difficult to reliably block specific CoD servers without the risk of breaking something else. If CoD is anything like most other modern online games, the servers will be hosted dynamically on a cloud service like AWS or i3D.
