proper way to configure /etc/hosts

Discussion in 'ISPConfig 3 Priority Support' started by conductive, Jan 15, 2018.

  1. conductive

    conductive Member HowtoForge Supporter

    ISPCONFIG3 on Debian 8.8 single server
    Everything works but I am having issues with setting up DNS Records and was not sure how to configure /etc/hosts and was not sure how to properly configure webserver, name server(s) and email server.

    /etc/hosts
    127.0.0.1 localhost.localdomain localhost
    xxx.xxx.xxx.170 server1.mydomain.com server1

    # The following lines are desirable for IPv6 capable hosts
    ::1 localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    -------------------------
    /etc/network/interfaces
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    source /etc/network/interfaces.d/*

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    auto eth0
    iface eth0 inet static

    address xxx.xxx.xxx.170
    netmask 255.255.255.248
    network xxx.xxx.xxx.168
    broadcast xxx.xxx.xxx.175
    gateway xxx.xxx.xxx.169

    # The secondary network interface
    auto eth0:0
    iface eth0:0 inet static

    address xxx.xxx.xxx.171
    netmask 255.255.255.248
    network xxx.xxx.xxx.168
    broadcast xxx.xxx.xxx.175
    gateway xxx.xxx.xxx.169

    # The third network interface
    auto eth0:1
    iface eth0:1 inet static

    address xxx.xxx.xxx.172
    netmask 255.255.255.248
    network xxx.xxx.xxx.168
    broadcast xxx.xxx.xxx.175
    gateway xxx.xxx.xxx.169

    # The fourth network interface
    auto eth0:2
    iface eth0:2 inet static

    address xxx.xxx.xxx.173
    netmask 255.255.255.248
    network xxx.xxx.xxx.168
    broadcast xxx.xxx.xxx.175
    gateway xxx.xxx.xxx.169

    # The Fith network interface
    auto eth0:3
    iface eth0:3 inet static

    address xxx.xxx.xxx.174
    netmask 255.255.255.248
    network xxx.xxx.xxx.168
    broadcast xxx.xxx.xxx.175
    gateway xxx.xxx.xxx.169
    -------------
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The hosts file is ok, it's not related to the creation of DNS records. The network config file looks fine as well, just ensure that the address, netmask etc. lines are indented.
     
  3. conductive

    conductive Member HowtoForge Supporter

    Thanks Till
     

Share This Page