I have noticed sites loading slowly as it looks like the timeout for blocked content takes around 30 seconds. I am aware of using iptables to sort this out.
I did get this working on Ubuntu using iptables somehow however on reboot stopped working and am unable to get it working again by re-entering the rules. Since Ubuntu is using UFW and not iptables I was wondering if anyone has a decent step by step guide for setting up these rules correctly with UFW. I have had a look around and tried a few things but no luck.
I used the following rules
iptables -A INPUT -p tcp --destination-port 443 -j REJECT --reject-with tcp-reset
iptables -A INPUT -p udp --destination-port 80 -j REJECT --reject-with icmp-port-unreachable
iptables -A INPUT -p udp --destination-port 443 -j REJECT --reject-with icmp-port-unreachable
ip6tables -A INPUT -p tcp --destination-port 443 -j REJECT --reject-with tcp-reset
ip6tables -A INPUT -p udp --destination-port 80 -j REJECT --reject-with icmp6-port-unreachable
ip6tables -A INPUT -p udp --destination-port 443 -j REJECT --reject-with icmp6-port-unreachable
Thanks for your assistance