#!/bin/bash

IFADDR="172.17.0.1/24"

#if [[ ip link show docker0 ]]; then
  iptables -t nat -F
  ifconfig docker0 down
  brctl delbr docker0
#fi

#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
#fi


