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?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum