I needed to update some servers and block traffic generated by a lot of services. Since I couldn’t block every single service neither disconnect the network, I used this simple iptables
rule:
iptables -A INPUT -p tcp -m state --state NEW -m multiport ! --dports 22 -j REJECT