Monday, 27 November 2017

linux - How to make my default gateway permanent in CentOS? So that after a reboot it does not get lost


I have a CentOS running. It is important to have my CentOS available when I am remotely connected to a VPN router. I tried to add a default gateway to the VPN router, but after reboot it goes away. How can i put this as permanent?


ip route add 192.168.2.3 via 10.0.0.1 dev eth0

Answer



If i've read your question right, i think you want to add


GATEWAY=192.168.2.3


into /etc/sysconfig/network then reboot or do service network restart to test it.


Although i'm not entirely sure from your question that you do actually want a default gateway at all. I think you may just want to make a static route permanent ?


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...