Setting Up Static IP Address

To know the gateway and netmask of your IP address, please see this guide http://wiki.crowncloud.net/?viewing_network_gateway_netmask

RHEL / CentOS / Fedora

Let’s start with the first file:

nano /etc/sysconfig/network

Replace, YOUR_HOSTNAME_HERE with your hostname and IP_GATEWAY with the Gateway IP Address which can be found at our control panel,

NETWORKING=yes
HOSTNAME=YOUR_HOSTNAME_HERE
GATEWAY=IP_GATEWAY
NETWORKING_IPV6=yes
IPV6INIT=yes

Next edit,

nano /etc/sysconfig/network-scripts/ifcfg-eth0

In that file make the following changes, Leave, UUID and HWADDR as-is,

DEVICE="eth0"
BOOTPROTO="static"
DNS1="8.8.8.8"
DNS2="8.8.4.4"
GATEWAY="IP_GATEWAY"
IPADDR="VPS_MAIN_IP"
NETMASK="IP_NETMASK"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"

Next edit resolve.conf,

nano /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4

Once you have made your changes restart the networking with:

service network restart

Debian / Ubuntu

To setup static IP address in Debian/ Ubuntu, open the following file:

nano /etc/network/interfaces

You may see a line looking like this:

auto eth0
iface eth0 inet dhcp

Change it so it looks like this:

auto eth0
iface eth0 inet static 
address VPS_MAIN_IP
netmask IP_NETMASK
gateway IP_GATEWAY
dns-nameservers 8.8.8.8
dns-nameservers 8.8.4.4

Next, Edit /etc/resolv.conf,

nano /etc/resolv.conf
nameserver 8.8.8.8 
nameserver 8.8.4.4

Restart your networking service,

service networking restart

CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS