I've noticed that manually entered commands can disappear. For instance, the command nft insert rule inet fw4 input_wan ip saddr 1.1.1.1 tcp dport 22 counter reject has been successfully added to the nft table and effectively blocks traffic from 1.1.1.1
However, this manually entered command disappears from the nft table after a few minutes. How can I prevent the system from resetting the nft table?
Thank you for your advice, indeed using the firewall's UCI format may be a good idea, but I feel it can be a bit cumbersome. I would like also to try the method you suggested above.