Debian and Ubuntu pre-18.04 instructions

Post Reply
User avatar
Edge100x
Founder
Founder
Posts: 12219
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Debian and Ubuntu pre-18.04 instructions

Post by Edge100x » Mon Jun 13, 2011 12:35 pm

To add an IP in Ubuntu or Debian,
  1. Log in to your server as the "root" user via the "VNC console" page in your control panel.
  2. Open up the "/etc/network/interfaces" file in your favorite editor -- for instance, type "nano /etc/network/interfaces" to use nano.
  3. Cursor down to the end of the file and look for the last "auto eth0" or "auto eth0:x" line, where "x" is some number. On a dedicated machine, "eth0" may be something else like "p1p1"; if so, you'll need to use that different name.
  4. If you had the ":x", pick a number one higher than the "x". If you didn't, use "0". We'll call that number "y".
  5. Add a set of lines using "y" to the end of the file in the following format:

    Code: Select all

    auto eth0:y
    iface eth0:y inet static
    address your.ip.address
    netmask your.netmask
    gateway your.gateway
    
    Replace "your.ip.address", "your.netmask", and "your.gateway" with the corresponding information for the IP that you are adding, from your control panel "IP list" page.
  6. Save the file. In the "nano" editor, you can do this by hitting Control-X, then telling it "y" to save before it closes.
  7. Enter the following command to restart your networking system:

    Code: Select all

    /etc/init.d/networking restart

User avatar
Edge100x
Founder
Founder
Posts: 12219
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Ubuntu/Debian instructions

Post by Edge100x » Mon Sep 10, 2012 9:41 pm

If you are running Ubuntu 12.xx+, you are changing the primary IP, and you don't already have these lines, add this line, as well, below the other lines following "iface eth0 inet static":

Code: Select all

dns-nameservers 8.8.8.8

Post Reply