You may receive the following errors when trying to add certain iptables rules:
root@test:~# sudo iptables -t nat -A PREROUTING -i venet0 -p tcp --dport 80 -j DNAT --to-destination 10.7.0.2
iptables v1.8.7 (nf_tables): CHAIN_ADD failed (Device or resource busy): chain PREROUTING
root@test:~#
root@test:~# sudo iptables -t nat -A PREROUTING -i venet0 -p tcp --dport 443 -j DNAT --to-destination 10.7.0.2
iptables v1.8.7 (nf_tables): CHAIN_ADD failed (Device or resource busy): chain PREROUTING
root@test:~#
root@test:~# sudo iptables -t nat -A POSTROUTING -o wg0 -p tcp --dport 80 -d 10.7.0.2 -j SNAT --to-source 10.7.0.1
iptables v1.8.7 (nf_tables): CHAIN_ADD failed (Device or resource busy): chain POSTROUTING
root@test:~#
root@test:~# sudo iptables -t nat -A POSTROUTING -o wg0 -p tcp --dport 443 -d 10.7.0.2 -j SNAT --to-source 10.7.0.1
iptables v1.8.7 (nf_tables): CHAIN_ADD failed (Device or resource busy): chain POSTROUTING
root@test:~#
To resolve this issue, please run the following command:
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
The above command will persist between reboots.