我现在有一个工作的OpenVPN设置,用户可以在家里将私人网络与他们的计算机连接起来。
然而,大多数手机只支持IPSec,所以我想为带有IPSec的手机提供与使用OpenVPN的计算机相同的服务。
我找不到任何描述如何配置OpenSWAN以向客户端提供私有IP的教程。
使用我的OpenVPN,客户端必须提供一个密钥和密码才能访问。
是否可以将OpenSWAN配置为向客户端提供私有IP,类似于我的OpenVPN设置?
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
发布于 2012-07-18 13:32:14
IPSec的工作方式与OpenVPN不同,我认为您不可能像对OpenVPN那样对SWAN做同样的事情。有用于手机的OpenVPN客户端,但的确,其中许多客户端仅包括ipsec客户端。
您可能要做的是使用OpenSWAN设置一个隧道,然后使用该隧道连接在其上启动PPP连接/L2TP。这将是负责向公路战士提供‘客户ip’的一部分。这是带有一些例子的文章。OpenSWAN站点上也有一些快速信息。
还请记住,一般来说,IPSec处理NAT很糟糕,这可能会增加设置的复杂性。
https://serverfault.com/questions/408836
复制相似问题