Jumat, 09 Januari 2015

Set IP Proxmox Console

Setting a Static IP and DNS in Debian/Ubuntu over the CLI

Some times you just need a static IP but have no GUI to easily set one up. Well it is not so hard to do in Debian-based distributions.
  1. Open /etc/network/interfaces in your favorite editor. I like nano.
  2. Find the line that starts with iface [interface]. The interface you are looking for is most likely eth0 or something similar.
  3. Change the line to read iface [interface] inet static.
  4. After it add your IP information. I have included a common example but just replace my information with your own.
    address 192.168.1.100
    netmask 255.255.255.0
    gateway 192.168.1.1
  5. Open /etc/resolv.conf.
  6. In it use the nameserver directive to specify your name server(s). The nameserver directive(s) will be searched in the order entered here. Here is an example:
    nameserver 192.168.1.2
    nameserver 192.168.1.3
  7. Restart networking with sudo /etc/init.d/networking restart.
[Edit] 2013.08.10
Thanks to Renat Zaripov for pointing out my mistake in typing /etc/resolve.conf instead of /etc/resolv.conf.

Tidak ada komentar:

Posting Komentar