Requests still being served despite iptables block for subnet

Solution 1:

With IPTables, rules are processed in the order they appear in the chains. Your system has Ubuntu ufw firewall management system set up, and it has installed a set of rules.

In your specific example, packets come to the system to INPUT chain. In the chain, on line 41, packets start to traverse ufw-before-logging-input chain. That chain contains several rules, until packets are passed to ufw-user-input chain on line 73.

In ufw-user-input, there is the rule to accept packets coming to ports 80 and 443 on lines 111 and 110 respectively.

Now, since your added rules are at the end of INPUT chain, it means that those rules are never reached, because packets are already accepted in ufw-user-input chain.

In your case, I recommend you to look up the official way of adding DROP rules in ufw, instead of bypassing it with separate iptables commands.