
Hi Peter, Peter Wolf via luv-beginners wrote:
I am trying to block ip address with ufw.I have used the command
sudo ufw deny from xxx.xxx.xxx.xxx to any
According to tcptrack the ip is still getting a connection.
I haven't used ufw in a while, but first check if it is turned on. sudo ufw enable You can also run some diagnostic commands: sudo ufw status sudo ufw status verbose sudo ufw show user-rules These commands come from the system documentation ("man ufw"), also available here: https://manpages.debian.org/stretch/ufw/ufw.8.en.html http://manpages.ubuntu.com/manpages/xenial/en/man8/ufw.8.html Another obvious thing to check is if to and from are backwards. Try both: sudo ufw deny from A.B.C.D sudo ufw deny to A.B.C.D Under the hood, ufw is a wrapper around iptables/netfilter ("iptables" is the userspace part, "netfilter" is the kernel part). I can read the raw iptables rules better than ufw rules. If you attach them, I can take a look for you. This will print out the IPv6 rules in a format I can understand: sudo iptables-save -c