Skip to content

Instantly share code, notes, and snippets.

@NrI3
Created March 23, 2023 00:03
Show Gist options
  • Save NrI3/5195adcb6ee9e3c71eb655ad6113b5db to your computer and use it in GitHub Desktop.
Save NrI3/5195adcb6ee9e3c71eb655ad6113b5db to your computer and use it in GitHub Desktop.
Change default network bridge
# Create Backup
sudo cp /var/snap/docker/common/var-lib-docker/network/files/local-kv.db /tmp/local-kv.db
# Remove config file
sudo rm /var/snap/docker/common/var-lib-docker/network/files/local-kv.db
# Set new network bridge
sudo printf '{\n "bip": "172.18.0.1/16",\n "ipv6": false,\n "fixed-cidr": "172.18.0.1/24"\n}\n' > /etc/docker/daemon.json
# Restart system
sudo systemctl restart docker
# Verify Network
ip a
# Reboot
reboot
# Verify
ip a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment