Modify your static IP on Ubuntu server

Nov 22, 2019 by Thibault Debatty | 1106 views


This seems easy, but... When you modify your static IP address in /etc/network/interfaces, the old IP is not removed. The new IP is simply added to your interface.

You can check this using the command

ip address

To remove the old IP address you can either:

  1. remove the old IP (and you have to specify the correct netmask and interface):
sudo ip addr del dev enp0s8
sudo service networking restart
  1. remove all IP's from the interface (but be careful not to cut your own SSH connection!)
sudo ip addr flush dev enp0s8
sudo service networking restart
Getting started with Ansible
Ansible is an extremely powerful configuration management system. Ansible is able to perform a wide range of tasks on a large and heterogeneous ensemble of devices. Indeed, it relies on a system of modules (plugins) that allow to perform different tasks like software provisioning, system and application configuration management, application-deployment etc. Moreover, Ansible modules exist to manage a wide variety of devices like Linux and Windows computers, but also network equipment like switches and routers, kubernetes clusters and other cloud services like AWS, GCE and Azure. For this reasons, Ansible is sometimes coined as an infrastructure automation engine.
A light NAT router and DHCP server with Alpine Linux
Alpine Linux is a very light Linux distribution, that can run with less than 100MB of harddisk space. Here is how to configure Alpine Linux to run as a NAT router and DHCP server.
DNS over HTTPS and DNS over TLS with dnsdist
DNS is a real corner stone of privacy and security on the Internet! From the security point of view, DNS is used by your machine to link a domain name to an IP address. DNS is also used to find the email server of a recipient (using MX records). On a desktop computer, DNS is used by email clients to perform auto-configuration. Over the Internet, DNS records are used to prevent BGP hijacking (using RPKI). The list is long! From the privacy point of view, the DNS queries sent by your computer offer a clear view of the services you use.