This content was moved from Qiita.
Configuration Notes for Ubuntu 18.04
Personal notes on changes in Ubuntu versions that caught my attention.
Changing the Hostname
# hostnamectl set-hostname sv1.example.jp
Setting up iptables
With netplan, it doesn’t work well with if-pre-up.d? Using iptables-persistent works well.
# apt install iptables-persistent
# <configure iptables>
# iptables-save > /etc/iptables/rules.v4
# ip6tables-save > /etc/iptables/rules.v6
Configuring netplan
Place the file in yaml format in /etc/netplan/*.yaml
network:
ethernets:
ens3:
addresses:
- 192.168.0.2/24
gateway4: 192.168.0.1
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
search: []
optional: true
version: 2
- Applying the configuration
# netplan --debug generate
# netplan apply