Skip to content

Instantly share code, notes, and snippets.

View essigt's full-sized avatar

Tim Essig essigt

View GitHub Profile
essigt /
Created March 22, 2018 15:26 — forked from ismell/
Scripts to re-create the docker0 bridge and setup a different ip subnet
#!/bin/bash -e
if [[ ! ip link show docker0 ]]; then
ip link add docker0 type bridge
ip addr add "$IFADDR" dev docker0
ip link set docker0 up
iptables -t nat -A POSTROUTING -s "$IFADDR" ! -d "$IFADDR" -j MASQUERADE