Ipsec重装无法加载ipsec.conf Strongswan 5.0

我无法使用fedora 17 linux机器和strongSwanv5.0.1dr2configuration与Android设备的连接。 我已经取得了一些进展,但是当我尝试添加configuration以支持xauth身份validation时,我尝试重新加载configuration文件时收到一个错误。 我为keyexchange设置的值ikev1得到了类似的错误,每当我尝试为rightauth设置一个值。 有其他人有这个问题ipsec.conf的手册页和strongswan wiki上的文档都表明,这些设置和值应该在5.0.xx罚款我可以尝试设置authby,但根据我阅读的文档已弃用xauthpsk值不起作用。 任何帮助非常感谢谢谢。

无法加载configuration“/etc/ipsec.conf”:/etc/ipsec.conf:25:语法错误,意外的STRING [leftauth]

# /etc/ipsec.conf - Openswan IPsec configuration file # # Manual: ipsec.conf.5 # # Please place your own config files in /etc/ipsec.d/ ending in .conf version 2.0 # conforms to second version of ipsec.conf specification # basic configuration config setup # For Red Hat Enterprise Linux and Fedora, leave protostack=netkey protostack=netkey # Enable this if you see "failed to find any available worker" # nhelpers=0 plutodebug=all conn %default ikelifetime=240m #keylifetime=20m keyingtries=3 ikev2=no conn android left=10.1.12.212 right=10.1.12.140 leftxauthserver=yes leftauth=psk rightauth=xauth keyexchange=ikev1 type=tunnel pfs=no rekey=no auto=start ike=aes256-md5;modp1024 phase2=esp ikev2=no #You may put your configuration (.conf) file in the "/etc/ipsec.d/" #include /etc/ipsec.d/*.conf 

要使用strongSwan 5.0.xconfigurationXAuth PSK(作为响应者),您必须使用:

  leftauth=psk rightauth=psk rightauth2=xauth 

虽然不推荐使用authby=xauthpsk但实际上它仍然可以作为上面的别名(同时添加了xauth=server )。

无法加载configuration“/etc/ipsec.conf”:/etc/ipsec.conf:25:语法错误,意外的STRING [leftauth]

这个错误以及这里使用的几个选项都没有有效的strongSwan选项(例如phase2leftxauthserverike的值的分号也是无效的)导致我相信你实际上不使用strongSwan,而是使用Openswan( leftauth是那里有一个无效的选项)。

由于您可能直接从tarball构build开发人员版本,原因可能是您没有提供正确的./configure选项(例如--prefix--sysconfdir )来replace默认Fedora Openswan软件包提供的ipsec脚本。 为避免冲突,您可能需要删除该软件包,如果没有,也可以使用--with-ipsec-script=strongswan选项将strongSwan的ipsec脚本重命名为strongswan