About /etc/networks/interfaces and /etc/hosts

Discussion in 'Installation/Configuration' started by tirengarfio, Dec 12, 2013.

  1. tirengarfio

    tirengarfio New Member

    Hi,

    I'm following the instructions to install IPSConfig on Ubuntu 12.04. I have arrived to the step 7 and it talks about modifying vi "/etc/network/interfaces" and "/etc/hosts". Since I'm following these instructions for a remote VPS (84.124.94.250), not for my local machine, Im wondering how the result would be for both files.

    These are the files in the instructions:

    Code:
    127.0.0.1       localhost.localdomain   localhost
    192.168.0.100   server1.example.com     server1
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    Code:
    # The primary network interface
    auto eth0
    iface eth0 inet static
            address 192.168.0.100
            netmask 255.255.255.0
            network 192.168.0.0
            broadcast 192.168.0.255
            gateway 192.168.0.1
            dns-nameservers 8.8.8.8 8.8.4.4
    And these are my current files:

    Code:
    # This configuration file is auto-generated.
    #
    # WARNING: Do not edit this file, your changes will be lost.
    # Please create/edit /etc/network/interfaces.head and
    # /etc/network/interfaces.tail instead, their contents will be
    # inserted at the beginning and at the end of this file, respectively.
    #
    # NOTE: it is NOT guaranteed that the contents of /etc/network/interfaces.tail
    # will be at the very end of this file.
    #
    
    # Auto generated lo interface
    auto lo
    iface lo inet loopback
    
    # Auto generated venet0 interface
    auto venet0
    iface venet0 inet manual
            up ifconfig venet0 up
            up ifconfig venet0 127.0.0.2
            up route add default dev venet0
            down route del default dev venet0
            down ifconfig venet0 down
    
    
    iface venet0 inet6 manual
            up route -A inet6 add default dev venet0
            down route -A inet6 del default dev venet0
    
    auto venet0:0
    iface venet0:0 inet static
            address 84.124.94.250
            netmask 255.255.255.255
    Code:
    fe00::0         ip6-localnet
    ff00::0         ip6-mcastprefix
    ff02::1         ip6-allnodes
    ff02::2         ip6-allrouters
    
    127.0.0.1 localhost.localdomain localhost
    # Auto-generated hostname. Please do not remove this comment.
    84.124.94.250 vps.server.com  vps
    ::1             localhost ip6-localhost ip6-loopback
     
  2. dcurrey

    dcurrey Member

    Your vps should be setup as static so no dhcp, so no modifications in interfaces.

    Your resolve.conf should be fine.

    Note: At least thats how my vps set it up in interfaces did have to add the line in resolve.conf
     
    Last edited: Dec 12, 2013
  3. tirengarfio

    tirengarfio New Member

    So I dont have to touch my interfaces? And /etc/hosts

    I don't know what you mean about resolve.conf..
     
  4. dcurrey

    dcurrey Member

    My bad!

    Was actually referring to /etc/hosts

    Sorry about that. :( Don't know what I was thinking.
     
    Last edited: Dec 13, 2013

Share This Page