Skip to content

Instantly share code, notes, and snippets.

@konosukef
Created May 21, 2016 06:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save konosukef/d76389433bac21e59ce00d36b7a16fe3 to your computer and use it in GitHub Desktop.
Save konosukef/d76389433bac21e59ce00d36b7a16fe3 to your computer and use it in GitHub Desktop.
L2TP/IPsec RSA
# Secrets for authentication using CHAP
# client server secret IP addresses
username * password *
# ipsec.conf - strongSwan IPsec configuration file
config setup
conn l2tp
left=%any
leftprotoport=udp/l2tp
leftid=vpn.example.com
leftcert=vpn.example.com
right=%any
rightprotoport=udp/%any
keyingtries=1
keyexchange=ikev1
type=transport
auto=add
# This file holds shared secrets or RSA private keys for authentication.
# RSA private key for this host, authenticating it to any other host
# which knows the public part.
: RSA vpn.example.com.key
ms-dns 8.8.8.8
ms-dns 8.8.4.4
auth
crtscts
lock
mru 1280
mtu 1280
proxyarp
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
noccp
[global]
port = 1701
[lns default]
ip range = 10.10.0.2-10.10.0.254
local ip = 10.10.0.1
length bit = yes
refuse pap = yes
refuse chap = yes
require authentication = yes
name = l2tp
pppoptfile = /etc/ppp/options.l2tpd.lns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment