How Do I Permanently Add Static Route in Linux Debian?
Contents How Do I Make a Static Route Permanent in Linux? Adding Permanent Static Routes on Rhel or Centos, You Need to Modify the Interface File in...
Contents
How do I make a static route permanent in Linux?
Adding permanent static routes
On RHEL or CentOS, you need to modify the interface file in ‘/etc/sysconfig/network-scripts’. For example, here, we have to add routes on network interface ens192. Hence, the file we need to modify will be ‘/etc/sysconfig/network-scripts/route-ens192’.
How do I add a persistent route in Debian?
For example under Red Hat/Fedora Linux you can add a static route for eth0 network interface by editing /etc/sysconfig/network-scripts/route-eth0 file. Under Debian Linux add static route by editing /etc/network/interface file.