yalegria / devops-git-actions

0 stars 0 forks source link

How to setup an static ip address on a Virtualbox Ubuntu server. #6

Closed yuriaru closed 3 years ago

Voxelghiest commented 3 years ago

Setting up a static ip address on an Ubuntu 18.04 server is described in detail on this webpage. To abbreviate, however, you have to do the following:

  1. Find the name of the network card you want to modify by using ip link.
  2. Go to the /etc/netplan folder in your server, which will contain a .yaml file for the network configuration.
  3. Edit the .yaml file, adding an entry for the network card under ethernets:. In that entry, disable dchp4 and manually enter the IP address you wish for the network card to have along with the gateway IP and nameservers.
  4. Save your changes, and then apply the network changes using sudo netplan apply.
yuriaru commented 3 years ago

Done.