背景
我现在有一个可以正常工作的OpenVPN设置,用户可以在家里用他们的电脑连接私人networking。
然而,大多数手机只支持IPSec,所以我想为IPSec手机提供相同的服务,就像我使用OpenVPN的计算机一样。
问题
我找不到任何教程介绍如何configurationOpenSWAN为客户端提供私有IP。
使用我的OpenVPN,客户端必须提供密钥和密码才能访问。
题
OpenSWAN可以configuration为给客户端一个私有IP,类似于我的OpenVPN设置?
OpenVPNconfiguration
port 1194 proto udp dev tun ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt cert /etc/openvpn/secrets/server.crt key /etc/openvpn/secrets/server.key dh /etc/openvpn/secrets/dh1024.pem server 192.168.240.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "route 10.10.64.0 255.255.252.0" push "dhcp-option DNS xxx.xxx.xxx.xxx" duplicate-cn keepalive 10 120 comp-lzo user openvpn group openvpn persist-key persist-tun status /var/log/openvpn-status.log log-append /var/log/openvpn.log verb 4 mute 20 plugin /usr/lib64/openvpn/plugin/lib/openvpn-auth-ldap.so "/etc/openvpn/auth/ldap.conf" script-security 2 auth-user-pass-verify /etc/openvpn/scripts/check_cn_on_connect.sh via-env learn-address /etc/openvpn/scripts/log_clients_ip.sh
IPSec的工作方式与OpenVPN不同,我认为你不能像使用OpenVPN一样使用SWAN。 有用于电话的OpenVPN客户端,但是,其中许多客户端仅包括ipsec客户端。
你可能想要做的就是用OpenSWANbuild立一个隧道,然后使用这个隧道连接来启动一个PPP连接/ L2TP。 这将是负责向道路战士提供“客户端IP”的部分。 这是一个有一些例子的文章 。 OpenSWAN网站也有一些快速的信息 。
还要记住,IPSec通常对于NAT的处理是可怕的,这可能会增加设置的复杂性。