how to put ufw rule in front of rules written by kube proxy?

I am installing k8s in bare metal using k3s. The problem I am facing is that nodeport directly passes through the ufw rules. Do you know any way to prepend ufw rules in front of rules by kubernetes?