Skip to content

Instantly share code, notes, and snippets.

@ilyaglow
Last active February 9, 2021 19:18
Show Gist options
  • Save ilyaglow/889ede3786a7c9da375f5bc3302646ec to your computer and use it in GitHub Desktop.
Save ilyaglow/889ede3786a7c9da375f5bc3302646ec to your computer and use it in GitHub Desktop.
Turn on IP forwarding on external interface using systemd-networkd
echo "IPForward = yes" >> /etc/systemd/network/"$(ip route get 8.8.8.8 | head -n1 | cut -d ' ' -f5)".network && systemctl restart systemd-networkd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment