我终于能够在我的计算机 (strongswan) 和 Zyxel Zywall 110 之间建立一条隧道并运行。
我正在使用证书进行连接,从日志来看,实际的 VPN 连接似乎已经建立。
May 4 14:14:49 user charon-nm: 10[IKE] authentication of 'remote.company.com' with RSA signature successful
May 4 14:14:49 user charon-nm: 10[IKE] IKE_SA Company[1] established between 192.168.43.101[C=NO, CN=user]...X.X.X.X[remote.company.com]
May 4 14:14:49 user charon-nm: 10[IKE] scheduling rekeying in 35793s
May 4 14:14:49 user charon-nm: 10[IKE] maximum IKE_SA lifetime 36393s
May 4 14:14:49 user charon-nm: 10[CFG] handling INTERNAL_IP4_NETMASK attribute failed
May 4 14:14:49 user charon-nm: 10[IKE] installing new virtual IP 192.168.100.6
May 4 14:14:49 user charon: 14[KNL] 192.168.100.6 appeared on wlan0
May 4 14:14:49 user avahi-daemon[645]: Registering new address record for 192.168.100.6 on wlan0.IPv4.
May 4 14:14:49 user charon-nm: 10[IKE] received ESP_TFC_PADDING_NOT_SUPPORTED, not using ESPv3 TFC padding
May 4 14:14:49 user charon-nm: 10[IKE] CHILD_SA Company{1} established with SPIs c71e085c_i 46449091_o and TS 192.168.100.6/32 === X.X.X.X/32
May 4 14:14:49 user NetworkManager[1076]: <info> VPN connection 'Company' (IP4 Config Get) reply received from old-style plugin.
May 4 14:14:49 user NetworkManager[1076]: nm_ip4_config_add_nameserver: assertion 'nameserver > 0' failed
May 4 14:14:49 user NetworkManager[1076]: nm_ip4_config_add_wins: assertion 'wins > 0' failed
May 4 14:14:49 user NetworkManager[1076]: nm_ip4_config_add_wins: assertion 'wins > 0' failed
May 4 14:14:49 user NetworkManager[1076]: <info> Tunnel Device: tun0
May 4 14:14:49 user NetworkManager[1076]: <info> IPv4 configuration:
May 4 14:14:49 user NetworkManager[1076]: <info> Internal Address: 192.168.100.6
May 4 14:14:49 user NetworkManager[1076]: <info> Internal Prefix: 32
May 4 14:14:49 user NetworkManager[1076]: <info> Internal Point-to-Point Address: 0.0.0.0
May 4 14:14:49 user NetworkManager[1076]: <info> Maximum Segment Size (MSS): 0
May 4 14:14:49 user NetworkManager[1076]: <info> Forbid Default Route: yes
May 4 14:14:49 user NetworkManager[1076]: <info> Internal DNS: 192.168.16.2
May 4 14:14:49 user NetworkManager[1076]: <info> DNS Domain: '(none)'
May 4 14:14:49 user NetworkManager[1076]: <info> No IPv6 configuration
May 4 14:14:49 user charon-nm: 14[KNL] interface tun0 activated
May 4 14:14:49 user charon: 07[KNL] interface tun0 activated
May 4 14:14:49 user kernel: [15417.710286] brcmsmac bcma0:1: brcms_ops_bss_info_changed: arp filtering: 2 addresses (implement)
May 4 14:14:49 user charon-nm: 05[KNL] 192.168.100.6 appeared on tun0
May 4 14:14:49 user charon: 11[KNL] 192.168.100.6 appeared on tun0
May 4 14:14:50 user NetworkManager[1076]: <info> VPN connection 'Company' (IP Config Get) complete.
但是,即使 VPN 似乎已建立,但输出ipsec statusall
似乎并不一致。
Status of IKE charon daemon (strongSwan 5.1.2, Linux 3.19.0-33-generic, x86_64):
uptime: 4 hours, since May 04 09:57:53 2016
malloc: sbrk 2568192, mmap 0, used 330496, free 2237696
worker threads: 11 of 16 idle, 5/0/0/0 working, job queue: 0/0/0/0, scheduled: 0
loaded plugins: charon test-vectors aes rc2 sha1 sha2 md4 md5 rdrand random nonce x509 revocation constraints pkcs1 pkcs7 pkcs8 pkcs12 pem openssl xcbc cmac hmac ctr ccm gcm attr kernel-netlink resolve socket-default stroke updown eap-identity addrblock
Listening IP addresses:
192.168.43.101
192.168.100.6
10.0.3.1
192.168.100.6
Connections:
Security Associations (0 up, 0 connecting):
none
最后,输出ip route show
给了我以下内容。
default via 192.168.43.1 dev wlan0 proto static
10.0.3.0/24 dev lxcbr0 proto kernel scope link src 10.0.3.1
192.168.43.0/24 dev wlan0 proto kernel scope link src 192.168.43.101 metric 9
VPN 连接已配置网络管理器,我正在使用证书建立连接。我无法访问已建立 VPN 连接的网络上的任何资源。
我在配置中遗漏了什么吗?我会错过什么?
NetworkManager 插件( )使用的 IKE 守护程序
charon-nm
不同于您通过脚本charon
与之交互的常规 IKE 守护程序 ( ) 。ipsec
因此,您将无法看到通过 NetworkManager 插件建立的连接的状态,
ipsec statusall
因为这只会显示由常规守护程序管理的连接和 SA,它们在ipsec.conf
.