CentOS7  で  L2TP/IPsecサーバを構築した時のメモ書きになります。

①.SELinuxを無効にする

vi /etc/sysconfig/selinux

変更前

SELINUX=enforcing

変更後

SELINUX=disabled

enforcing → disabled にする事でSELinuxが無効になります。

②.EPELリポジトリの追加

rpm -ivh http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

③.IPsec(libreswan)、L2TP(xl2tpd)、lsof 、 iptablesのインストール

yum -y –enablerepo=epel install xl2tpd

yum -y install libreswan lsof

yum -y install iptables-services 

④.xl2tpd.conf の設定

vi /etc/xl2tpd/xl2tpd.conf

;
; This is a minimal sample xl2tpd configuration file for use
; with L2TP over IPsec.
;
; The idea is to provide an L2TP daemon to which remote Windows L2TP/IPsec
; clients connect. In this example, the internal (protected) network
; is 192.168.1.0/24.  A special IP range within this network is reserved
; for the remote clients: 192.168.1.128/25
; (i.e. 192.168.1.128 ... 192.168.1.254)
;
; The listen-addr parameter can be used if you want to bind the L2TP daemon
; to a specific IP address instead of to all interfaces. For instance,
; you could bind it to the interface of the internal LAN (e.g. 192.168.1.98
; in the example below). Yet another IP address (local ip, e.g. 192.168.1.99)
; will be used by xl2tpd as its address on pppX interfaces.

[global]

auth file = /etc/ppp/chap-secrets

; listen-addr = 192.168.1.98
;
; requires openswan-2.5.18 or higher - Also does not yet work in combination
; with kernel mode l2tp as present in linux 2.6.23+
; ipsec saref = yes
; Use refinfo of 22 if using an SAref kernel patch based on openswan 2.6.35 or
;  when using any of the SAref kernel patches for kernels up to 2.6.35.
; saref refinfo = 30
;
; force userspace = yes
;
; debug tunnel = yes

[lns default]
ip range = 192.168.0.100-192.168.0.254
local ip = 192.168.0.10
require chap = yes
refuse pap = yes
require authentication = yes
name = xl2tpd
ppp debug = yes
pppoptfile = /etc/ppp/options.xl2tpd
length bit = yes

以下の内容を環境に合わせて変更する必要があります。

ip range = 192.168.0.100-192.168.0.254

※.端末が使用するIPアドレスの範囲を指定します。

local ip = 192.168.0.10

※.サーバ側のIPアドレスになります。

⑤.options.xl2tpd の設定

vi /etc/ppp/options.xl2tpd

ipcp-accept-local
ipcp-accept-remote
#ms-dns 192.168.11.1
#ms-dns  8.8.8.8
# ms-dns  192.168.1.1
# ms-dns  192.168.1.3
# ms-wins 192.168.1.2
# ms-wins 192.168.1.4
noccp
auth
crtscts
idle 1800
mtu 1410
mru 1410
nodefaultroute
debug
lock
proxyarp
connect-delay 5000
# To allow authentication against a Windows domain EXAMPLE, and require the
# user to be in a group "VPN Users". Requires the samba-winbind package
# require-mschap-v2
# plugin winbind.so
# ntlm_auth-helper '/usr/bin/ntlm_auth --helper-protocol=ntlm-server-1 --require-membership-of="EXAMPLE\\
VPN Users"'
# You need to join the domain on the server, for example using samba:
# http://rootmanager.com/ubuntu-ipsec-l2tp-windows-domain-auth/setting-up-openswan-xl2tpd-with-native-win
dows-clients-lucid.html

name xl2tpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
persist
logfile /var/log/xl2tpd.log

#でコメントアウトしていない部分が設定内容になります。

⑥.ipsec.confの設定

vi /etc/ipsec.conf

# /etc/ipsec.conf - Libreswan IPsec configuration file

# This file:  /etc/ipsec.conf
#
# Enable when using this configuration file with openswan instead of libreswan
version 2
#
# Manual:     ipsec.conf.5

# basic configuration
config setup
# which IPsec stack to use, "netkey" (the default), "klips" or "mast".
# For MacOSX use "bsd"
protostack=netkey
nat_traversal=yes

#
# Normally, pluto logs via syslog. If you want to log to a file,
# specify below or to disable logging, eg for embedded systems, use
# the file name /dev/null
# Note: SElinux policies might prevent pluto writing to a log file at
#       an unusual location.
logfile=/var/log/pluto.log
#interfaces="%defaultroute"
#interfaces="ipsec0=eth0 ipsec1=ppp0"
#
# If you want to limit listening on a single IP - not required for
# normal operation
#listen=127.0.0.1
#
# Do not set debug options to debug configuration issues!
#
# plutodebug / klipsdebug = "all", "none" or a combation from below:
# "raw crypt parsing emitting control kernel pfkey natt x509 dpd
#  private".
# Note: "crypt" is not included with "all", as it can show confidential
#       information. It must be specifically specified
# examples:
# plutodebug="control parsing"
# plutodebug="all crypt"
# Again: only enable plutodebug or klipsdebug when asked by a developer
#plutodebug=none
#klipsdebug=none
#
# Enable core dumps (might require system changes, like ulimit -C)
# This is required for abrtd to work properly
# Note: SElinux policies might prevent pluto writing the core at
#       unusual locations
dumpdir=/var/run/pluto/
#
# NAT-TRAVERSAL support
# exclude networks used on server side by adding %v4:!a.b.c.0/24
# It seems that T-Mobile in the US and Rogers/Fido in Canada are
# using 25/8 as "private" address space on their wireless networks.
# This range has never been announced via BGP (at least upto 2015)
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12,%v4:25.0.0.0/8,%v4:100.64.0.0/10,%v6:fd00::/8,%v6:fe80::/10

# For example connections, see your distribution's documentation directory,
# or https://libreswan.org/wiki/
#
# There is also a lot of information in the manual page, "man ipsec.conf"
#
# It is best to add your IPsec connections as separate files in /etc/ipsec.d/
include /etc/ipsec.d/*.conf

#でコメントアウトしていない部分が設定内容になります。

⑦.l2tp-ipsec.conf の設定

vi /etc/ipsec.d/l2tp-ipsec.conf

conn L2TP-PSK-NAT
rightsubnet=0.0.0.0/0
forceencaps=no
also=L2TP-PSK-noNAT

conn L2TP-PSK-noNAT

#iOS用の設定
dpddelay=10
dpdtimeout=20
dpdaction=clear
#iOS用の設定 ここまで

authby=secret
pfs=no
auto=add
keyingtries=3
rekey=no

ikelifetime=8h
keylife=1h

type=transport

left=%defaultroute
leftprotoport=17/%any

right=%any
rightprotoport=17/%any

※.forceencaps=no を YES にするとWindowsが接続出来なくなります。

⑧.chap-secretsの設定

vi /etc/ppp/chap-secrets

# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
"USER" * "Password" *

※.USER には、接続するためのID情報を記入します。

※.Passwordには、接続するためのパスワー情報を記入します。

⑨.default.secretsの設定

vi /etc/ipsec.d/default.secrets

: PSK "共有鍵"

※.IPsec用PSK(事前共有鍵)の情報になります。

⑩.iptables.shの設定

ファイアウォール構築(iptables)を参考にさせて頂きました。

vi /shell/iptables.sh

#!/bin/bash

#---------------------------------------#
# 設定開始                              #
#---------------------------------------#

# 内部ネットワークアドレス定義
LOCALNET=192.168.0.0/24

#---------------------------------------#
# 設定終了                              #
#---------------------------------------#

# デフォルトルール(以降のルールにマッチしなかった場合に適用するルール)設定
IPTABLES_CONFIG=`mktemp`
echo "*filter" >> $IPTABLES_CONFIG
echo ":INPUT DROP [0:0]" >> $IPTABLES_CONFIG       # 受信はすべて破棄
echo ":FORWARD DROP [0:0]" >> $IPTABLES_CONFIG     # 通過はすべて破棄
echo ":OUTPUT ACCEPT [0:0]" >> $IPTABLES_CONFIG    # 送信はすべて許可
echo ":ACCEPT_COUNTRY - [0:0]" >> $IPTABLES_CONFIG # 指定した国からのアクセスを許可
echo ":DROP_COUNTRY - [0:0]" >> $IPTABLES_CONFIG   # 指定した国からのアクセスを破棄
echo ":LOG_PINGDEATH - [0:0]" >> $IPTABLES_CONFIG  # Ping of Death攻撃はログを記録して破棄

# 自ホストからのアクセスをすべて許可
echo "-A INPUT -i lo -j ACCEPT" >> $IPTABLES_CONFIG

# 内部からのアクセスをすべて許可
echo "-A INPUT -s $LOCALNET -j ACCEPT" >> $IPTABLES_CONFIG

# 内部から行ったアクセスに対する外部からの返答アクセスを許可
echo "-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT" >> $IPTABLES_CONFIG

# SYN Cookiesを有効にする
# ※TCP SYN Flood攻撃対策
sysctl -w net.ipv4.tcp_syncookies=1 > /dev/null
sed -i '/net.ipv4.tcp_syncookies/d' /etc/sysctl.conf
echo "net.ipv4.tcp_syncookies=1" >> /etc/sysctl.conf

# ブロードキャストアドレス宛pingには応答しない
# ※Smurf攻撃対策
sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 > /dev/null
sed -i '/net.ipv4.icmp_echo_ignore_broadcasts/d' /etc/sysctl.conf
echo "net.ipv4.icmp_echo_ignore_broadcasts=1" >> /etc/sysctl.conf

# ICMP Redirectパケットは拒否
sed -i '/net.ipv4.conf.*.accept_redirects/d' /etc/sysctl.conf
for dev in `ls /proc/sys/net/ipv4/conf/`
do
sysctl -w net.ipv4.conf.$dev.accept_redirects=0 > /dev/null
echo "net.ipv4.conf.$dev.accept_redirects=0" >> /etc/sysctl.conf
done

# Source Routedパケットは拒否
sed -i '/net.ipv4.conf.*.accept_source_route/d' /etc/sysctl.conf
for dev in `ls /proc/sys/net/ipv4/conf/`
do
sysctl -w net.ipv4.conf.$dev.accept_source_route=0 > /dev/null
echo "net.ipv4.conf.$dev.accept_source_route=0" >> /etc/sysctl.conf
done

# フラグメント化されたパケットはログを記録して破棄
echo "-A INPUT -f -j LOG --log-prefix \"[IPTABLES FRAGMENT] : \"" >> $IPTABLES_CONFIG
echo "-A INPUT -f -j DROP" >> $IPTABLES_CONFIG

# 外部とのNetBIOS関連のアクセスはログを記録せずに破棄
# ※不要ログ記録防止
echo "-A INPUT ! -s $LOCALNET -p tcp -m multiport --dports 135,137,138,139,445 -j DROP" >> $IPTABLES_CONFIG
echo "-A INPUT ! -s $LOCALNET -p udp -m multiport --dports 135,137,138,139,445 -j DROP" >> $IPTABLES_CONFIG
echo "-A OUTPUT ! -d $LOCALNET -p tcp -m multiport --sports 135,137,138,139,445 -j DROP" >> $IPTABLES_CONFIG
echo "-A OUTPUT ! -d $LOCALNET -p udp -m multiport --sports 135,137,138,139,445 -j DROP" >> $IPTABLES_CONFIG

# 1秒間に4回を超えるpingはログを記録して破棄
# ※Ping of Death攻撃対策
echo "-A LOG_PINGDEATH -m limit --limit 1/s --limit-burst 4 -j ACCEPT" >> $IPTABLES_CONFIG
echo "-A LOG_PINGDEATH -j LOG --log-prefix \"[IPTABLES PINGDEATH] : \"" >> $IPTABLES_CONFIG
echo "-A LOG_PINGDEATH -j DROP" >> $IPTABLES_CONFIG
echo "-A INPUT -p icmp --icmp-type echo-request -j LOG_PINGDEATH" >> $IPTABLES_CONFIG

# 全ホスト(ブロードキャストアドレス、マルチキャストアドレス)宛パケットはログを記録せずに破棄
# ※不要ログ記録防止
echo "-A INPUT -d 255.255.255.255 -j DROP" >> $IPTABLES_CONFIG
echo "-A INPUT -d 224.0.0.1 -j DROP" >> $IPTABLES_CONFIG

# 113番ポート(IDENT)へのアクセスには拒否応答
# ※メールサーバ等のレスポンス低下防止
echo "-A INPUT -p tcp --dport 113 -j REJECT --reject-with tcp-reset" >> $IPTABLES_CONFIG

# ACCEPT_COUNTRY_MAKE関数定義
# 指定された国のIPアドレスからのアクセスを許可するユーザ定義チェイン作成
ACCEPT_COUNTRY_MAKE(){
for addr in `cat /tmp/cidr.txt|grep ^$1|awk '{print $2}'`
do
echo "-A ACCEPT_COUNTRY -s $addr -j ACCEPT" >> $IPTABLES_CONFIG
done
grep ^$1 $IP_LIST >> $CHK_IP_LIST
}

# DROP_COUNTRY_MAKE関数定義
# 指定された国のIPアドレスからのアクセスを破棄するユーザ定義チェイン作成
DROP_COUNTRY_MAKE(){
for addr in `cat /tmp/cidr.txt|grep ^$1|awk '{print $2}'`
do
echo "-A DROP_COUNTRY -s $addr -m limit --limit 1/s -j LOG --log-prefix \"[IPTABLES DENY_COUNTRY] : \"" >> $IPTABLES_CONFIG
echo "-A DROP_COUNTRY -s $addr -j DROP" >> $IPTABLES_CONFIG
done
grep ^$1 $IP_LIST >> $CHK_IP_LIST
}

# IPアドレスリスト取得
IP_LIST=/tmp/cidr.txt
CHK_IP_LIST=/tmp/IPLIST
if [ ! -f $IP_LIST ]; then
wget -q http://nami.jp/ipv4bycc/cidr.txt.gz
gunzip -c cidr.txt.gz > $IP_LIST
rm -f cidr.txt.gz
fi
rm -f $CHK_IP_LIST

# 日本からのアクセスを許可するユーザ定義チェインACCEPT_COUNTRY作成
ACCEPT_COUNTRY_MAKE JP
# 以降,日本からのみアクセスを許可したい場合はACCEPTのかわりにACCEPT_COUNTRYを指定する

# 全国警察施設への攻撃元上位5カ国(日本・アメリカを除く)からのアクセスをログを記録して破棄
# http://www.cyberpolice.go.jp/detect/observation.htmlより
DROP_COUNTRY_MAKE CN
DROP_COUNTRY_MAKE CA
DROP_COUNTRY_MAKE IR
DROP_COUNTRY_MAKE NL
DROP_COUNTRY_MAKE TW
echo "-A INPUT -j DROP_COUNTRY" >> $IPTABLES_CONFIG

#----------------------------------------------------------#
# 各種サービスを公開する場合の設定(ここから)               #
#----------------------------------------------------------#

# 外部からのTCP22番ポート(SSH)へのアクセスを日本からのみ許可
# ※SSHサーバーを公開する場合のみ
#echo "-A INPUT -p tcp --dport 22 -j ACCEPT_COUNTRY" >> $IPTABLES_CONFIG

# 外部からのTCP/UDP53番ポート(DNS)へのアクセスを許可
# ※外部向けDNSサーバーを運用する場合のみ
#echo "-A INPUT -p tcp --dport 53 -j ACCEPT" >> $IPTABLES_CONFIG
#echo "-A INPUT -p udp --dport 53 -j ACCEPT" >> $IPTABLES_CONFIG

# 外部からのTCP80番ポート(HTTP)へのアクセスを許可
# ※Webサーバーを公開する場合のみ
#echo "-A INPUT -p tcp --dport 80 -j ACCEPT" >> $IPTABLES_CONFIG

# 外部からのTCP443番ポート(HTTPS)へのアクセスを許可
# ※Webサーバーを公開する場合のみ
#echo "-A INPUT -p tcp --dport 443 -j ACCEPT" >> $IPTABLES_CONFIG

# 外部からのTCP21番ポート(FTP)へのアクセスを日本からのみ許可
# ※FTPサーバーを公開する場合のみ
#echo "-A INPUT -p tcp --dport 21 -j ACCEPT_COUNTRY" >> $IPTABLES_CONFIG

# 外部からのPASV用ポート(FTP-DATA)へのアクセスを日本からのみ許可
# ※FTPサーバーを公開する場合のみ
# ※PASV用ポート60000:60030は当サイトの設定例
#echo "-A INPUT -p tcp --dport 60000:60030 -j ACCEPT_COUNTRY" >> $IPTABLES_CONFIG

# 外部からのTCP25番ポート(SMTP)へのアクセスを許可
# ※SMTPサーバーを公開する場合のみ
#echo "-A INPUT -p tcp --dport 25 -j ACCEPT" >> $IPTABLES_CONFIG

# 外部からのTCP465番ポート(SMTPS)へのアクセスを日本からのみ許可
# ※SMTPSサーバーを公開する場合のみ
#echo "-A INPUT -p tcp --dport 465 -j ACCEPT_COUNTRY" >> $IPTABLES_CONFIG

# 外部からのTCP110番ポート(POP3)へのアクセスを日本からのみ許可
# ※POP3サーバーを公開する場合のみ
#echo "-A INPUT -p tcp --dport 110 -j ACCEPT_COUNTRY" >> $IPTABLES_CONFIG

# 外部からのTCP995番ポート(POP3S)へのアクセスを日本からのみ許可
# ※POP3Sサーバーを公開する場合のみ
#echo "-A INPUT -p tcp --dport 995 -j ACCEPT_COUNTRY" >> $IPTABLES_CONFIG

# 外部からのTCP143番ポート(IMAP)へのアクセスを日本からのみ許可
# ※IMAPサーバーを公開する場合のみ
#echo "-A INPUT -p tcp --dport 143 -j ACCEPT_COUNTRY" >> $IPTABLES_CONFIG

# 外部からのTCP993番ポート(IMAPS)へのアクセスを日本からのみ許可
# ※IMAPSサーバーを公開する場合のみ
#echo "-A INPUT -p tcp --dport 993 -j ACCEPT_COUNTRY" >> $IPTABLES_CONFIG

# 外部からのUDP1194番ポート(OpenVPN)へのアクセスを日本からのみ許可
# ※OpenVPNサーバーを公開する場合のみ
#echo "-A INPUT -p udp --dport 1194 -j ACCEPT_COUNTRY" >> $IPTABLES_CONFIG

# 外部からのUDP1701番ポート(L2TP)へのアクセスを日本からのみ許可
# ※LL2TP/IPSecサーバーを公開する場合のみ
echo "-A INPUT -p udp --dport 1701 -j ACCEPT_COUNTRY" >> $IPTABLES_CONFIG

# 外部からのUDP4500番ポート(IPsec/NAT)へのアクセスを日本からのみ許可
# ※IL2TP/IPSecサーバーを公開する場合のみ
echo "-A INPUT -p udp --dport 4500 -j ACCEPT_COUNTRY" >> $IPTABLES_CONFIG

# 外部からのUDP500番ポート(ISAKMP)へのアクセスを日本からのみ許可
# ※IL2TP/IPSecaサーバーを公開する場合のみ
echo "-A INPUT -p udp --dport 500 -j ACCEPT_COUNTRY" >> $IPTABLES_CONFIG
# ※IL2TP/IPSecaサーバーを公開する場合のみ
echo "-A INPUT -j REJECT --reject-with icmp-host-prohibited" >> $IPTABLES_CONFIG
echo "-A FORWARD -i ppp+ -j ACCEPT" >> $IPTABLES_CONFIG
echo "-A FORWARD -o ppp+ -j ACCEPT" >> $IPTABLES_CONFIG
echo "-A FORWARD -j REJECT --reject-with icmp-host-prohibited" >> $IPTABLES_CONFIG
# VPNインタフェース用ファイアウォール設定
# ※OpenVPNサーバーを公開する場合のみ
#[ -f /etc/openvpn/openvpn-startup ] && \
#grep ^iptables /etc/openvpn/openvpn-startup|sed -e 's/iptables //p' -e d >> $IPTABLES_CONFIG

#----------------------------------------------------------#
# 各種サービスを公開する場合の設定(ここまで)               #
#----------------------------------------------------------#

# 拒否IPアドレスからのアクセスはログを記録せずに破棄
# ※拒否IPアドレスは/root/deny_ipに1行ごとに記述しておくこと
# (/root/deny_ipがなければなにもしない)
if [ -s /root/deny_ip ]; then
for ip in `cat /root/deny_ip`
do
echo "-I INPUT -s $ip -j DROP" >> $IPTABLES_CONFIG
done
fi

# 上記のルールにマッチしなかったアクセスはログを記録して破棄
echo "-A INPUT -m limit --limit 1/s -j LOG --log-prefix \"[IPTABLES INPUT] : \"" >> $IPTABLES_CONFIG
echo "-A INPUT -j DROP" >> $IPTABLES_CONFIG
echo "-A FORWARD -m limit --limit 1/s -j LOG --log-prefix \"[IPTABLES FORWARD] : \"" >> $IPTABLES_CONFIG
echo "-A FORWARD -j DROP" >> $IPTABLES_CONFIG

# ファイアウォール設定反映
echo "COMMIT" >> $IPTABLES_CONFIG

# NAT接続情報
# ※IL2TP/IPSecaサーバーを公開する場合のみ
echo "*nat" >> $IPTABLES_CONFIG
echo ":PREROUTING ACCEPT [0:0]" >> $IPTABLES_CONFIG
echo ":POSTROUTING ACCEPT [0:0]" >> $IPTABLES_CONFIG
echo ":OUTPUT ACCEPT [0:0]" >> $IPTABLES_CONFIG
echo "-A POSTROUTING -s $LOCALNET -j MASQUERADE" >> $IPTABLES_CONFIG
echo "COMMIT" >> $IPTABLES_CONFIG

cat $IPTABLES_CONFIG > /etc/sysconfig/iptables
if [ -f /usr/libexec/iptables/iptables.init ]; then
/usr/libexec/iptables/iptables.init restart
else
/etc/rc.d/init.d/iptables restart
fi
rm -f $IPTABLES_CONFIG

※.IL2TP/IPSecサーバーとして記入している部分が設定内容です。

また、IL2TP/IPSecサーバーで使用するポート以外は解放していないです。

⑪.カーネルパラメータの変更

vi /etc/sysctl.conf

net.ipv4.ip_forward = 1 ←1に修正

以下の内容を追記
net.core.xfrm_larval_drop = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.eth0.send_redirects = 0
net.ipv4.conf.eth1.send_redirects = 0
net.ipv4.conf.lo.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.eth0.accept_redirects = 0
net.ipv4.conf.eth1.accept_redirects = 0
net.ipv4.conf.lo.accept_redirects = 0
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.eth0.rp_filter = 0
net.ipv4.conf.lo.rp_filter = 0

※./sbin/sysctl -p を実行する事で再起動無しで反映する事が出来ます。

⑫.firewalldのサービス停止と自動起動停止

systemctl stop firewalld
systemctl disable firewalld
systemctl is-enabled firewalld

iptablesを使用する為、firewalldのサービスを停止します。

⑬.サービスの起動

systemctl enable xl2tpd
systemctl enable ipsec
systemctl enable iptables
systemctl restart iptables xl2tpd ipsec

iptables、xl2tpd、ipsecのサービスを自動起動後

サービスを起動する設定になります。

⑭.libreswanの動作確認

ipsec verify

Version check and ipsec on-path                     [OK]
Libreswan 3.12 (netkey) on 2.6.32-431.el6.x86_64
Checking for IPsec support in kernel                [OK]
NETKEY: Testing XFRM related proc values
ICMP default/send_redirects                [OK]
ICMP default/accept_redirects              [OK]
XFRM larval drop                           [OK]
Pluto ipsec.conf syntax                             [OK]
Hardware random device                              [N/A]
Checking rp_filter                                  [OK]
Checking that pluto is running                      [OK]
Pluto listening for IKE on udp 500                 [OK]
Pluto listening for IKE/NAT-T on udp 4500          [OK]
Pluto ipsec.secret syntax                          [OK]
Checking 'ip' command                               [OK]
Checking 'iptables' command                         [OK]
Checking 'prelink' command does not interfere with FIPSChecking for obsolete ipsec.conf options             [OK]
Opportunistic Encryption                            [DISABLED]

上記の内容で設定が完了になります。

また、Windows系 については以下のレジストリの値を変更する必要があります。

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PolicyAgent\

AssumeUDPEncapsulationContextOnSendRule を作成します。

DWORD (32 ビット) 値を2を記入します。

詳細は、URLの情報を参照してください。

筆者の場合は、Windows 10 で接続する事が出来ました。