This guide is applicable only for KVM VPSes, for OpenVZ VPSes please Click here
Edit the file eth0 (or similar) config file,
If your network interface isn't eth0, you can find it by checking,
ifconfig (or) ifconfig -a
If using Ubuntu, the interface name may be ens3 (You can verify this with ifconfig -a)
- Replace INTERFACE with the value from the ifconfig output,
- Information for the IPv4_Address/Netmask/Gateway and IPv6_Address/Netmask/Gateway can be found from CrownPanel. Click here to know how
- Note IPv6_Netmask is either 48 or 64, do not add the "/" as shown in the panel.
And then add/edit the following to the file,
auto INTERFACE iface INTERFACE inet static address IPv4_Address netmask IPv4_Netmask gateway IPv4_Gateway iface INTERFACE inet6 static address IPv6_Address netmask IPv6_Netmask gateway IPv6_Gateway dns-nameservers 2001:4860:4860::8844 2001:4860:4860::8888
Save and exit the file.
systemctl restart networking