Adding First IP in - Debian KVM

1) Add the lines below in your /etc/network/interfaces. Change Your-VPS-Main-IP-Addresswith the main IP of your VPS.

auto lo eth0
iface lo inet loopback
iface eth0 inet static
    address Your-VPS-Main-IP-Address
    broadcast Your-VPS-Main-IP-Address
    post-up route add dev eth0
    post-up route add default gw
    pre-down route del dev eth0
    pre-down route del default gw

2) Add Nameserver in /etc/resolv.conf


3) Enable network.

ifup eth0
  • 0 Users Found This Useful
Was this answer helpful?