おのたく日記 YouTubeも始めました→
2014-10-07(Tue) [長年日記]
■ [Debian][L2TP/IPsec] StrongSwanに乗り換え
Debian Jassie(8.0)からOpenSwanが無くなったので、StrongSwanに乗り換える。
sysctlはOpenSwanのように設定ファイルがないので、ファイルを作る
net.ipv4.ip_forward = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.eth0.send_redirects = 0
net.ipv4.conf.eth0.accept_redirects = 0
net.ipv4.conf.lo.send_redirects = 0
net.ipv4.conf.lo.accept_redirects = 0
[/etc/sysctl.d/ipsec.confより引用]
ipsecの設定は似ているけど少し違う
conn L2TP-NAT
rightsubnet=0.0.0.0/0
also=L2TP-noNAT
conn L2TP-noNAT
forceencaps=yes
authby=secret
auto=add
keyexchange=ikev1
keyingtries=3
ike=aes128-sha1-modp3072
esp=aes128-sha1-modp3072
rekey=no
ikelifetime=8h
lifetime=1h
type=transport
left=192.168.193.134
leftprotoport=17/1701
right=%any
rightprotoport=17/%any
dpddelay=40
dpdtimeout=130
dpdaction=clear
[/etc/ipsec.confに追記より引用]
共通鍵は、いつもどおりただし、":"の前後にスペースが必要。
%any : PSK "パスーワード"
[/etc/ipsec.secretsに追記より引用]
そしてStrongSwanの設定して
charon {
load_modular = yes
plugins {
include strongswan.d/charon/*.conf
}
dns1=192.168.193.134
}
[/etc/strongswan.confにdns1追記より引用]
あとは、xl2tpdの設定-2013年2月3日の日記のままで、L2TP/IPsecが動く
|