I've created a shell script as shown below, intending to add rules to the nft table. However, a few minutes after executing the script, the rules disappeared despite having been successfully added to the nft table initially.
Confirmed, when using keepalived and the node switches to the Master status, the Master will reset its firewall. In this situation, how do I prevent the firewall from being reset?
Thank you for your suggestion. Are you suggesting that I should avoid using this kind of nft command line, and instead use uci or the section you mentioned above? I can confirm that when using keepalived and the node switches to the Master status, the Master node will reset its firewall. I'm not sure how to create a proper above section.