Skip to content

Instantly share code, notes, and snippets.

@rwohleb
Last active October 2, 2025 19:02
Show Gist options
  • Select an option

  • Save rwohleb/16011d739ebadc436ef00cd9860f8a8a to your computer and use it in GitHub Desktop.

Select an option

Save rwohleb/16011d739ebadc436ef00cd9860f8a8a to your computer and use it in GitHub Desktop.
Fix docker networking because of AWS VPN client

Fix docker networking because of AWS VPN client

The AWS VPN client sucks and it breaks docker networking. It flips ip_forwarding off when you connect. This script will fix that.

sudo nano /etc/network/if-up.d/tun-up sudo chmod +x /etc/network/if-up.d/tun-up

#!/bin/sh
# filename: tun-up
if [ "$IFACE" = tun0 ]; then
# Fix ip_forard since the AWS VPN client sucks. This fixes docker networking.
sysctl -w net.ipv4.ip_forward=1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment