Score:0

"ip rule" iproute2 save/restore script?

us flag

I am using a bit advanced network configuration with multiple routing tables. I configure these initially using ip rule add from $interface table rtable_$interface commands. I can save these rules into a file using ip rules save > ip-rules.cfg and restore them using ip rule restore < ip-rules.cfg.

I know of the iptables-persistent package that provides a convenient solution for saving and restoring iptables configurations. This will unfortunately not work for me.

I can't seem to find the equivalent for iproute2, i.e. "ip rule". Do i have to make my own?

PS: I am on Ubuntu 18.04 LTS - perhaps a script like that was added in Ubuntu 20.04 LTS or Ubuntu 22.04 LTS? Pointers welcome.

neuhaus avatar
us flag
I don't see how it is relevant but what if i want to save/restore the effect of commands such as "ip rule add from ens5 table rt5"? "
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.