Skip to content

Instantly share code, notes, and snippets.

@ckaznable
Last active October 3, 2024 07:15
Show Gist options
  • Save ckaznable/b8f175f4237815629bdf21e8cd018b6a to your computer and use it in GitHub Desktop.
Save ckaznable/b8f175f4237815629bdf21e8cd018b6a to your computer and use it in GitHub Desktop.
specific ip pass by l2tp vpn
nmcli con add \
type vpn \
vpn-type l2tp \
con-name "My L2TP VPN" \
ifname "" \
vpn.data "gateway=VPN_SERVER_IP,
user=YOUR_USERNAME,
password-flags=1,
ipsec-enabled=yes,
ipsec-psk=YOUR_PRESHARED_KEY"
nmcli con modify "My L2TP VPN" ipv4.routes "123.45.67.89/32, 98.76.54.32/32"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment