Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

https://graspingtech.com/ubuntu-server-18.04-static-ip/

https://linuxize.com/post/how-to-configure-static-ip-address-on-ubuntu-18-04/#configuring-static-ip-address-on-ubuntu-server

https://askubuntu.com/questions/1036266/what-is-the-most-authoritative-file-process-for-managing-ip-addresses-on-an-18-0

Disable Cloud-Network:

cat << 'EOL' >/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
network: {config: disabled}
EOL
sudo mv /etc/netplan/50-cloud-init.yaml /etc/netplan/01-netcfg.yaml

Set Static IP Example:

nano /etc/netplan/01-netcfg.yaml && netplan apply && ifconfig
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: false
      addresses: [192.168.1.11/24]
      gateway4: 192.168.1.1
      nameservers: 
        addresses: [1.1.1.1,8.8.8.8]
  • No labels