How to disable adding iptables rules?

Took the server with a pre-installed image of Ubuntu 16.04 immediately after you run iptables-save , there is such a rule
-A POSTROUTING -s ! -d SNAT --to-source XX.XX.XXX.XXX

If I understand correctly, it is added there by some script. Instead, the rules I need quite another

Otherwise my VPN refuses to give the Internet. How to do it correctly?
March 12th 20 at 07:59
2 answers
March 12th 20 at 08:01
In Debian (I think in Ubuntu is similar) startup script for iptables put in /etc/network/if-up.d/.
I now kind of found that they use cloud-init - settings /etc/cloud/cloud.cfg
But the fact that I have not yet found - Roosevelt_Zulauf commented on March 12th 20 at 08:04
March 12th 20 at 08:03
I first look at the table and chain number,
sudo iptables -L-nv --line-numbers
and then delete the rule number
sudo iptables-D (table, chain) (rule number)
sudo iptables-D INPUT 3

Find more questions by tags Network administrationIptables