There was a problem loading the comments.

How to assign static IP address for Linux VPS

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
  • 29/07/2019 9:56 PM

You need to logged in at https://my.centerhop.com with your choosen email address and password then open VNC console

1. CentOS 6.x
vi /etc/sysconfig/network-scripts/ifcfg-eth0
And modify following information:
DEVICE=ifcfg-eth0
ONBOOT=yes
IPADDR=your_ip_address
NETMASK=your_netmask_address
GATEWAY=your_gateway_address
Then restart network service to update new IP configuration with following command:
service network restart

2. CentOS 7.x
vi /etc/sysconfig/network-scripts/ifcfg-eth0
And modify following information:
DEVICE=”eth0″
BOOTPROTO=”static”
ONBOOT=”yes”
IPV6INIT=”yes”
IPV6_AUTOCONF=”yes”
NM_CONTROLLED=”no”
PEERDNS=”no”
IPADDR=your_ip_address
PREFIX=”your_netmask_prefix″
GATEWAY=your_gateway_address
DNS1=8.8.8.8
DNS2=8.8.4.4
Then restart network service to update new IP configuration with following command:
systemctl restart network

3. Debian / Ubuntu VPS
vi /etc/network/interfaces
And modify following information:
auto eth0
iface eth0 inet static
address your_ip_address/prefix
gateway your_gateway_address
dns-nameservers 8.8.8.8 8.8.4.4
dns-options rotate
Then restart network service to update new IP configuration with following command:
service networking restart

Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

Captcha
© CenterHop