Skip to content

Instantly share code, notes, and snippets.

View lmergner's full-sized avatar

Luke Thomas Mergner lmergner

View GitHub Profile
@mrclay
mrclay / flush-iptables.sh
Last active December 2, 2025 18:52
Flush IP tables and restart docker
#!/bin/bash
# Script is needed because my default firewall rules are messed up and after
# every restart, docker containers can't make connections to the host, notably
# preventing debuggers like xdebug from attaching.
# If networking fails in your containers but works in others, rm and re-create the
# docker network that container is bound to.
set -euo pipefail