I want to set the outbound ip address from the route table.
I can use this command to achieve it, but may I ask how can I do it permanent even I reboot the server? Thank you
ip route change default via [gateway ip] src [outbound ip]
For "src [outbound ip] " part, shout I just do it in following way?
This is a very old question that people have run into since forever.
If you were on MWWindows, there is a command to make the custom routing entry persistent.
That doesn’t exist in Linux (unless someone decides to make it happen),
So,
The one very popular way which I’ve personally adopted is to simply add your command to /etc/sysctl.conf.
What this does is whenever you boot, any commands in this file are executed to re-make or re-apply custom configurations.
Read the contents of this file to see not only what is in this file but also the child sysctl files which also might contain settings.