Iptables forgetting second entry in OUTPUT chain

Hello all,

I encountered the following:

I have two rules in my iptables OUTPUT chain in order to block access to two servers. These rules were created using the following commands:

sudo iptables -I OUTPUT -p tcp -d server1.com -j REJECT
sudo iptables -I OUTPUT -p tcp -d server2.com -j REJECT

For unknown reasons, only the rule for server1.com survives a reboot. The rule for server2.com always disappears after a reboot and has to be re-inserted.

Or, in other words:
I set up the two rules

sudo iptables -I OUTPUT -p tcp -d server1.com -j REJECT
sudo iptables -I OUTPUT -p tcp -d server2.com -j REJECT

Right after these commands, I can confirm that the rules are set, with sudo iptables -L OUTPUT:

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
REJECT     tcp  --  anywhere             server2.com     reject-with icmp-port-unreachable
REJECT     tcp  --  anywhere             server1.com    reject-with icmp-port-unreachable

After a reboot (for example, after a kernel update), I only get

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination   
REJECT     tcp  --  anywhere             server1.com    reject-with icmp-port-unreachable

and server2.com is gone.
Why is it like this and what can I do to keep both rules persistent?

Solution seems to be the following:

After setting up the rules, they will have to be saved manually using

sudo iptables-save -f /etc/iptables/iptables.rules

as they are not saved automatically.
According to iptables - ArchWiki, there is iptables.service which then will load the saved rules on reboot.

Yes iptables rules are not saved at all, you need to use other tools to save your ruleset, or you can modify the base config of iptables manually to force rules after reboot.