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 |