openwrt18.06.4配置strongswan对接山石网科(hillstone)记录①

2023-11-09

首先感谢https://blog.csdn.net/d9394952/article/details/90734469 原贴作者

摸索了一个礼拜,将过程记录如下

首先将路由器连上网,更新opkg

root@OpenWrt:~# ping www.baidu.com
PING www.baidu.com (61.135.169.125): 56 data bytes
64 bytes from 61.135.169.125: seq=0 ttl=56 time=14.891 ms
^C
--- www.baidu.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 14.891/14.891/14.891 ms
root@OpenWrt:~# opkg update 

Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/packages/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_kmods
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/base/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/luci/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/routing/Packages.sig
Signature check passed.
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/telephony/Packages.sig
Signature check passed.

安装中文

root@OpenWrt:~# opkg install luci-i18n-base-zh-cn
Installing luci-i18n-base-zh-cn (git-20.112.60516-7cc22e1-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/luci/luci-i18n-base-zh-cn_git-20.112.60516-7cc22e1-1_all.ipk
Configuring luci-i18n-base-zh-cn.

 安装strongswan

root@OpenWrt:~# opkg install strongswan-default
Installing strongswan-default (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-default_5.6.3-3_mipsel_24kc.ipk
Installing libmnl (1.0.4-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/base/libmnl_1.0.4-1_mipsel_24kc.ipk
Installing ip-tiny (4.16.0-8) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/base/ip-tiny_4.16.0-8_mipsel_24kc.ipk
Installing kmod-crypto-hash (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-hash_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-null (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-null_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-aead (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-aead_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-pcompress (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-pcompress_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-manager (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-manager_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-authenc (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-authenc_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-cbc (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-cbc_4.14.131-1_mipsel_24kc.ipk
Installing kmod-lib-zlib-inflate (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-lib-zlib-inflate_4.14.131-1_mipsel_24kc.ipk
Installing kmod-lib-zlib-deflate (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-lib-zlib-deflate_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-acompress (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-acompress_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-deflate (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-deflate_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-des (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-des_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-echainiv (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-echainiv_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-hmac (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-hmac_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-sha256 (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-sha256_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-rng (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-rng_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-wq (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-wq_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-iv (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-iv_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-md5 (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-md5_4.14.131-1_mipsel_24kc.ipk
Installing kmod-crypto-sha1 (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-crypto-sha1_4.14.131-1_mipsel_24kc.ipk
Installing kmod-ipsec (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-ipsec_4.14.131-1_mipsel_24kc.ipk
Installing kmod-iptunnel4 (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-iptunnel4_4.14.131-1_mipsel_24kc.ipk
Installing kmod-ipsec4 (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-ipsec4_4.14.131-1_mipsel_24kc.ipk
Installing kmod-iptunnel6 (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-iptunnel6_4.14.131-1_mipsel_24kc.ipk
Installing kmod-ipsec6 (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-ipsec6_4.14.131-1_mipsel_24kc.ipk
Installing kmod-ipt-ipsec (4.14.131-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/kmods/4.14.131-1-94e97c3b21ec52cb72cec4eaff828985/kmod-ipt-ipsec_4.14.131-1_mipsel_24kc.ipk
Installing iptables-mod-ipsec (1.6.2-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/targets/ramips/mt7621/packages/iptables-mod-ipsec_1.6.2-1_mipsel_24kc.ipk
Installing strongswan (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-charon (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-charon_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-ipsec (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-ipsec_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-aes (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-aes_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-attr (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-attr_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-connmark (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-connmark_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-constraints (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-constraints_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-des (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-des_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-dnskey (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-dnskey_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-sha1 (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-sha1_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-fips-prf (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-fips-prf_5.6.3-3_mipsel_24kc.ipk
Installing libgmp (6.1.2-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/base/libgmp_6.1.2-1_mipsel_24kc.ipk
Installing strongswan-mod-gmp (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-gmp_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-hmac (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-hmac_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-kernel-netlink (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-kernel-netlink_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-md5 (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-md5_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-nonce (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-nonce_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-pem (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-pem_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-pgp (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-pgp_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-pkcs1 (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-pkcs1_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-pubkey (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-pubkey_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-random (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-random_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-rc2 (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-rc2_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-resolve (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-resolve_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-revocation (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-revocation_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-sha2 (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-sha2_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-socket-default (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-socket-default_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-sshkey (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-sshkey_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-stroke (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-stroke_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-updown (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-updown_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-x509 (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-x509_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-xauth-generic (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-xauth-generic_5.6.3-3_mipsel_24kc.ipk
Installing strongswan-mod-xcbc (5.6.3-3) to root...
Downloading http://downloads.openwrt.org/releases/18.06.4/packages/mipsel_24kc/packages/strongswan-mod-xcbc_5.6.3-3_mipsel_24kc.ipk
Configuring kmod-crypto-hash.
Configuring kmod-crypto-null.
Configuring kmod-crypto-aead.
Configuring kmod-crypto-pcompress.
Configuring kmod-crypto-manager.
Configuring libmnl.
Configuring ip-tiny.
Configuring kmod-crypto-authenc.
Configuring kmod-crypto-cbc.
Configuring kmod-lib-zlib-inflate.
Configuring kmod-lib-zlib-deflate.
Configuring kmod-crypto-acompress.
Configuring kmod-crypto-deflate.
Configuring kmod-crypto-des.
Configuring kmod-crypto-echainiv.
Configuring kmod-crypto-hmac.
Configuring kmod-crypto-sha256.
Configuring kmod-crypto-rng.
Configuring kmod-crypto-wq.
Configuring kmod-crypto-iv.
Configuring kmod-crypto-md5.
Configuring kmod-crypto-sha1.
Configuring kmod-ipsec.
Configuring kmod-iptunnel4.
Configuring kmod-ipsec4.
Configuring kmod-iptunnel6.
Configuring kmod-ipsec6.
Configuring kmod-ipt-ipsec.
Configuring iptables-mod-ipsec.
Configuring strongswan.
Configuring strongswan-mod-constraints.
Configuring strongswan-mod-sha1.
Configuring strongswan-mod-sha2.
Configuring strongswan-mod-connmark.
Configuring strongswan-mod-pem.
Configuring strongswan-mod-rc2.
Configuring strongswan-mod-aes.
Configuring strongswan-mod-pgp.
Configuring strongswan-mod-sshkey.
Configuring strongswan-mod-xcbc.
Configuring strongswan-mod-random.
Configuring strongswan-mod-pkcs1.
Configuring strongswan-mod-dnskey.
Configuring strongswan-mod-hmac.
Configuring strongswan-charon.
Configuring strongswan-mod-des.
Configuring strongswan-mod-fips-prf.
Configuring strongswan-mod-socket-default.
Configuring strongswan-mod-resolve.
Configuring strongswan-mod-pubkey.
Configuring strongswan-mod-kernel-netlink.
Configuring strongswan-ipsec.
Configuring strongswan-mod-attr.
Configuring libgmp.
Configuring strongswan-mod-gmp.
Configuring strongswan-mod-md5.
Configuring strongswan-mod-nonce.
Configuring strongswan-mod-revocation.
Configuring strongswan-mod-stroke.
Configuring strongswan-mod-updown.
Configuring strongswan-mod-x509.
Configuring strongswan-mod-xauth-generic.
Configuring strongswan-default.

备份原有的配置文件

root@OpenWrt:/etc# mv ipsec.conf ipsec.conf.bak 

使用vi或者nano等喜欢的编辑器编辑/etc/ipsec.conf文件如下(部分信息已脱敏处理)

config setup
conn tamz
  keyexchange=ikev1
  aggressive=yes #野蛮模式
  left=111.222.203.115 #本端IP
  right=222.111.105.103 #对端IP
  leftsubnet=192.168.1.0/24 #本端子网
  leftauth=psk
  rightauth=psk
  rightsubnet=11.11.11.0/27 #对端子网
  auto=start
  leftid=MOON #本端FQDN
  rightid=SUN #对端FQDN

  ike=des-md5-modp1024 #  P1提议

  esp=des-md5-modp1024 #P2提议
  lifetime=3600
  ikelifetime=10800
  type=tunnel

 编辑预存共享秘钥文件/etc/ipsec.secrets

root@OpenWrt:~# cat /etc/ipsec.secrets 
# /etc/ipsec.secrets - strongSwan IPsec secrets file
111.222.203.115 222.111.105.103 : PSK "123456"
: PSK "123456"

root@OpenWrt:~#

 

对端(山石网科)设备启动debug

debug vpn

debug vpn filter ip 111.222.203.115 #根据来源IP过滤

clear log deb #清除调试日志

show log deb #显示调试日志

启动ipsec (带调试)

root@OpenWrt:~# /usr/sbin/ipsec stop #装好strongswan默认启动,先停止
Stopping strongSwan IPsec...
root@OpenWrt:~# /usr/sbin/ipsec start --debug-all --nofork
Starting strongSwan 5.6.3 IPsec [starter]...
Loading config setup
Loading conn 'tamz'
  aggressive=yes
  auto=start
  esp=des-md5-modp1024
  ike=des-md5-modp1024
  ikelifetime=10800
  keyexchange=ikev1
  left=111.222.203.115
  leftauth=psk
  leftid=MOON
  leftsubnet=192.168.1.0/24
  lifetime=3600
  right=222.111.105.103
  rightauth=psk
  rightid=SUN
  rightsubnet=11.11.11.0/27
  type=tunnel
found netkey IPsec stack
Attempting to start charon...
00[DMN] Starting IKE charon daemon (strongSwan 5.6.3, Linux 4.14.131, mips)
00[CFG] loading ca certificates from '/etc/ipsec.d/cacerts'
00[CFG] loading aa certificates from '/etc/ipsec.d/aacerts'
00[CFG] loading ocsp signer certificates from '/etc/ipsec.d/ocspcerts'
00[CFG] loading attribute certificates from '/etc/ipsec.d/acerts'
00[CFG] loading crls from '/etc/ipsec.d/crls'
00[CFG] loading secrets from '/etc/ipsec.secrets'
00[CFG]   loaded IKE secret for 111.222.203.115 222.111.105.103
00[CFG]   loaded IKE secret for %any
00[LIB] loaded plugins: charon aes des rc2 sha2 sha1 md5 random nonce x509 revocation constraints pubkey pkcs1 pgp dnskey sshkey pem fips-prf gmp xcbc hmac attr kernel-netlink resolve socket-default connmark stroke updown xauth-generic
00[JOB] spawning 16 worker threads
charon (6472) started after 60 ms
07[CFG] received stroke: add connection 'tamz'
07[CFG] added configuration 'tamz'
08[CFG] received stroke: initiate 'tamz'
08[IKE] initiating Aggressive Mode IKE_SA tamz[1] to 222.111.105.103
08[ENC] generating AGGRESSIVE request 0 [ SA KE No ID V V V V V ]
08[NET] sending packet: from 111.222.203.115[500] to 222.111.105.103[500] (395 bytes)
10[NET] received packet: from 222.111.105.103[500] to 111.222.203.115[500] (305 bytes)
10[ENC] parsed AGGRESSIVE response 0 [ SA KE No ID HASH V V ]
10[IKE] received DPD vendor ID
10[ENC] received unknown vendor ID: 36:66:54:12:e8:c5:97:32:31:74:54:ee:ef:ef:85:b6
10[IKE] IKE_SA tamz[1] established between 111.222.203.115[MOON]...222.111.105.103[SUN]
10[IKE] scheduling reauthentication in 10083s
10[IKE] maximum IKE_SA lifetime 10623s
10[ENC] generating AGGRESSIVE request 0 [ HASH ]
10[NET] sending packet: from 111.222.203.115[500] to 222.111.105.103[500] (52 bytes)
10[ENC] generating QUICK_MODE request 3536586912 [ HASH SA No KE ID ID ]
10[NET] sending packet: from 111.222.203.115[500] to 222.111.105.103[500] (308 bytes)
09[NET] received packet: from 222.111.105.103[500] to 111.222.203.115[500] (292 bytes)
09[ENC] parsed QUICK_MODE response 3536586912 [ HASH SA No KE ID ID ]
09[IKE] CHILD_SA tamz{1} established with SPIs c769f274_i 71338dfa_o and TS 192.168.1.0/24 === 11.11.11.0/27
09[ENC] generating QUICK_MODE request 3536586912 [ HASH ]
09[NET] sending packet: from 111.222.203.115[500] to 222.111.105.103[500] (52 bytes)

新开ssh窗口,将隧道up

root@OpenWrt:~# /usr/sbin/ipsec up tamz
generating QUICK_MODE request 2481523623 [ HASH SA No KE ID ID ]
sending packet: from 111.222.203.115[500] to 112.250.105.103[500] (308 bytes)
received packet: from 112.250.105.103[500] to 111.222.203.115[500] (292 bytes)
parsed QUICK_MODE response 2481523623 [ HASH SA No KE ID ID ]
detected rekeying of CHILD_SA tamz{1}
CHILD_SA tamz{2} established with SPIs c143e092_i 71338dfc_o and TS 192.168.1.0/24 === 11.11.11.0/27
connection 'tamz' established successfully
root@OpenWrt:~# 

山石网科设备调试输出:

HILLSTONE@SUN[DBG]# sh log deb 
2020-04-28 07:40:30, DEBUG@VPN: Adding NON-ESP marker
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Receive Information.
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Begin decryption ...
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: IV was saved for next processing:
2020-04-28 07:40:32, DEBUG@VPN: f36fe69f 23e96f0e 
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: with key:
2020-04-28 07:40:32, DEBUG@VPN: a241f602 8ca2c206 
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Decrypted payload by IV:
2020-04-28 07:40:32, DEBUG@VPN: a7f2fe4a a92eb104 
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Skip to trim padding
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Decrypted packet:
....省略
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Decrypt packet sucessful!
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Hash validated.
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Purged SAs.
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Receive Information.
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Begin decryption ...
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: IV was saved for next processing:
2020-04-28 07:40:32, DEBUG@VPN: 34673ba3 0cfe67f2 
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: with key:
2020-04-28 07:40:32, DEBUG@VPN: a241f602 8ca2c206 
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Decrypted payload by IV:
2020-04-28 07:40:32, DEBUG@VPN: ce34f1ad 5536e4ef 
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Skip to trim padding
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Decrypted packet:
....省略
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Decrypt packet sucessful!
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Hash validated.
2020-04-28 07:40:32, DEBUG@VPN: Send IPSEC tunnel state change to inactive trap
2020-04-28 07:40:32, DEBUG@VPN: purged IPsec-SA proto_id=ESP spi=3303377835.
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Purged SAs.
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Receive Information.
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Begin decryption ...
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: IV was saved for next processing:
2020-04-28 07:40:32, DEBUG@VPN: a8b68c01 92bcb695 
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: with key:
2020-04-28 07:40:32, DEBUG@VPN: a241f602 8ca2c206 
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Decrypted payload by IV:
2020-04-28 07:40:32, DEBUG@VPN: 7b0798c7 f00ff11d 
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Skip to trim padding
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Decrypted packet:
....省略
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Decrypt packet sucessful!
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Hash validated.
2020-04-28 07:40:32, DEBUG@VPN: [111.222.203.115]: Purged SAs.
2020-04-28 07:40:33, DEBUG@VPN: [111.222.203.115]: ISAKMP-SA deleted 222.111.105.103:500-111.222.203.115:500 spi:3bf39aa0cecdb63c:db83e75920226378
2020-04-28 07:40:35, DEBUG@VPN: Adding NON-ESP marker
2020-04-28 07:40:37, DEBUG@VPN: phase2 negotiation failed due to time up waiting for phase1. 
2020-04-28 07:40:37, DEBUG@VPN: delete phase 2 handler.
2020-04-28 07:40:38, DEBUG@VPN: phase2 negotiation failed due to time up waiting for phase1. 
2020-04-28 07:40:38, DEBUG@VPN: delete phase 2 handler.
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Peer Aggressive mode, try to find rmconf.
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Peer id:
2020-04-28 07:40:39, DEBUG@VPN: 02000000 474b2d4c 444747
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Try to get rmconf by IP, id and local if.
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Peer ip: 111.222.203.115
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Local IP: 222.111.105.103
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Max dialupvpn cache num: 100 current num:0
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin to find rmconf with id
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Peer id:
2020-04-28 07:40:39, DEBUG@VPN: 474b2d4c 444747
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin to find a dynamic rmconf with strict
2020-04-28 07:40:39, DEBUG@VPN: [anonymous]: Begin to compare ID of dynamic rmconf strictly!
2020-04-28 07:40:39, DEBUG@VPN: [anonymous]: ID match
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Find a dynamic rmconf with strict, The ISAKMP Peer name FromGK-LDGG
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Get rmconf sucessful
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin to negotiate with found rmconf, name FromGK-LDGG
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: respond new phase 1 negotiation: 222.111.105.103:500<=>111.222.203.115:500
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: begin Aggressive mode.
2020-04-28 07:40:39, DEBUG@VPN: 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 1 aggressive mode first msg receive START.++++++++
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ===============Receive===============
2020-04-28 07:40:39, DEBUG@VPN: ISAKMP Header Format:
....省略
2020-04-28 07:40:39, DEBUG@VPN: ================================
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Dump of above packet:
....省略
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: phase 1 (aggressive mode): remote supports DPD
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Rmconf flag 10122.
2020-04-28 07:40:39, DEBUG@VPN: 474b2d4c 444747
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Compared: DB:Peer
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: (lifetime = 10800:10800)
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: (lifebyte = 0:0)
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: enctype = DES-CBC:DES-CBC 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: (encklen = 0:0)
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: hashtype = MD5:MD5
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: authmethod = pre-shared key:pre-shared key
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: dh_group = 1024-bit MODP group:1024-bit MODP group
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: An acceptable proposal found
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 1 aggressive mode first msg receive START.++++++++
2020-04-28 07:40:39, DEBUG@VPN: 
2020-04-28 07:40:39, DEBUG@VPN: 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 1 aggressive mode first msg send START.+++++++
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin to create ID payload for phase 1 ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Sucessful! Use ID type of FQDN
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin to compute SKEYID...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: The pre-shared key found
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Pre-shared key:
2020-04-28 07:40:39, DEBUG@VPN: 31323334 3536
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: SKEYID computed sucessful!the SKEYID:
2020-04-28 07:40:39, DEBUG@VPN: 787e31f6 e7400a2c 7b1593f9 48e9aef4 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin to compute SKEYID_d SKEYID_a SKEYID_e ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: SKEYID_d computed successful!the SKEYID_d:
2020-04-28 07:40:39, DEBUG@VPN: 382556c1 1a2faa9f d5d447fc 029d9b4c 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: SKEYID_a computed successful!the SKEYID_a:
2020-04-28 07:40:39, DEBUG@VPN: 4d09f23f bcebb11b ee9b61ed 4efa735b 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: SKEYID_e computed successful!the SKEYID_e:
2020-04-28 07:40:39, DEBUG@VPN: 06058653 85632a13 d31fcb0f a7ba43ce 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Compute sucessful!
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin to compute final encryption key ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Compute final encryption key sucessful!
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Final encryption key computed:
2020-04-28 07:40:39, DEBUG@VPN: 06058653 85632a13 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin to compute new IV ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Compute new IV sucessful!
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: IV computed:(for decoding packet)
2020-04-28 07:40:39, DEBUG@VPN: e2bec756 14bd735d 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: IV computed:(for encoding packet)
2020-04-28 07:40:39, DEBUG@VPN: e2bec756 14bd735d 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: phase 1 (aggressive mode): generate HASH_R
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin to compute phase1 HASH ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: HASH computed:
2020-04-28 07:40:39, DEBUG@VPN: e598a989 9c7ce98c 8ed22b63 82259e61 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Compute phase1 HASH successful!
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ===============Send===============
....省略
2020-04-28 07:40:39, DEBUG@VPN: ================================
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Dump of above packet:
....省略
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Resend phase1 packet 1204b97cd5269773:45bbb278f66d6b24
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 1 aggressive mode first msg send END.+++++++
2020-04-28 07:40:39, DEBUG@VPN: 
2020-04-28 07:40:39, DEBUG@VPN: 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: +++++++Phase 1 aggressive mode second msg receive START.++++++++
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin decryption ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: IV was saved for next processing:
2020-04-28 07:40:39, DEBUG@VPN: 946af0ab 2973a006 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: with key:
2020-04-28 07:40:39, DEBUG@VPN: 06058653 85632a13 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Decrypted payload by IV:
2020-04-28 07:40:39, DEBUG@VPN: e2bec756 14bd735d 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Skip to trim padding
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Decrypted packet:
....省略
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Decrypt packet sucessful!
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ===============Receive===============
2020-04-28 07:40:39, DEBUG@VPN: ISAKMP Header Format:
....省略
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ================================
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: DUMP of above packet:
2020-04-28 07:40:39, DEBUG@VPN: 1204b97c d5269773 45bbb278 f66d6b24 08100401 00000000 00000034 00000014
e1f72f00 20cdb764 47575ace d6b25945 00000000 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin to compute phase1 HASH ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: HASH computed:
2020-04-28 07:40:39, DEBUG@VPN: e1f72f00 20cdb764 47575ace d6b25945 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Compute phase1 HASH successful!
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: HASH for pre-shared key validated
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: +++++++Phase 1 aggressive mode second msg receive END.++++++++
2020-04-28 07:40:39, DEBUG@VPN: 
2020-04-28 07:40:39, DEBUG@VPN: 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: +++++++Phase 1 aggressive mode second msg send START.+++++++
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: +++++++Phase 1 aggressive mode second msg send END.+++++++
2020-04-28 07:40:39, DEBUG@VPN: 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: isakmp sa created time 2932160
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: *****ISAKMP-SA established 222.111.105.103:500-111.222.203.115:500 spi:1204b97cd5269773:45bbb278f66d6b24*****
2020-04-28 07:40:39, DEBUG@VPN: #一阶段完成
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: respond new phase 2 negotiation: 222.111.105.103:500<=>111.222.203.115:500
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 2 (quick mode) first msg receive START.++++++++
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin decryption ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: IV was saved for next processing:
2020-04-28 07:40:39, DEBUG@VPN: 445a862c 96068fe9 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: with key:
2020-04-28 07:40:39, DEBUG@VPN: 06058653 85632a13 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Decrypted payload by IV:
2020-04-28 07:40:39, DEBUG@VPN: 7a65ff7d 38755899 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Skip to trim padding
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Decrypted packet:
....省略
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Decrypt packet sucessful!
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ===============Receive===============
2020-04-28 07:40:39, DEBUG@VPN: ISAKMP Header Format:
....省略
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ================================
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Dump of above packet:
....省略
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: phase 2 (quick mode) : received IDci2:
2020-04-28 07:40:39, DEBUG@VPN: 04000000 c0a80100 ffffff00 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: phase 2 (quick mode) : received IDcr2:
2020-04-28 07:40:39, DEBUG@VPN: 04000000 0b0b0b00 ffffffe0 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: phase 2 (quick mode) : Begin to HASH(1) validate ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Phase 2 (quick mode) : HASH(1) matched.
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: get a src address from ID payload 192.168.1.0:0 prefixlen=24 ul_proto=255
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: get dst address from ID payload 11.11.11.0:0 prefixlen=27 ul_proto=255
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Suitable SP found:192.168.1.0:0/24[ 11.11.11.0:0/27[ proto=any dir=in
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]:  (proto_id=ESP spisize=4 spi=00000000 spi_p=00000000 encmode=Tunnel reqid=0:0)
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]:   (trns_id=DES encklen=0 authtype=hmac-md5)
2020-04-28 07:40:39, DEBUG@VPN: life duration was in TLV.
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin compare proposals
2020-04-28 07:40:39, DEBUG@VPN: prop#=0 prot-id=ESP spi-size=4 #trns=1 trns#=1 trns-id=DES
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin to compare my and peer's proposal ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Peer's single bundle:
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]:  (proto_id=ESP spisize=4 spi=cb4866e2 spi_p=00000000 encmode=Tunnel reqid=0:0)
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]:   (trns_id=DES encklen=0 authtype=hmac-md5)
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: My single bundle:
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]:  (proto_id=ESP spisize=4 spi=00000000 spi_p=00000000 encmode=Tunnel reqid=0:0)
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]:   (trns_id=DES encklen=0 authtype=hmac-md5)
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Matched #P2提议匹配
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 2 (quick mode) first msg receive END.++++++++
2020-04-28 07:40:39, DEBUG@VPN: 
2020-04-28 07:40:39, DEBUG@VPN: 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: +++++++Phase 2 (quick mode) first msg send START.++++++++
2020-04-28 07:40:39, DEBUG@VPN: life duration was in TLV.
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ===============Send===============
2020-04-28 07:40:39, DEBUG@VPN: ISAKMP Header Format:
....省略
2020-04-28 07:40:39, DEBUG@VPN: ================================
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Dump of above packet:
....省略
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin encryption ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Encrypted successful!
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: resend phase2 packet 1204b97cd5269773:45bbb278f66d6b24:0Xd5dedd08
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: +++++++Phase 2 (quick mode) first msg send END.++++++++
2020-04-28 07:40:39, DEBUG@VPN: 
2020-04-28 07:40:39, DEBUG@VPN: 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 2 (quick mode) second msg receive START.++++++++
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin decryption ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: IV was saved for next processing:
2020-04-28 07:40:39, DEBUG@VPN: 47fcfc9c d6e08400 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: with key:
2020-04-28 07:40:39, DEBUG@VPN: 06058653 85632a13 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Decrypted payload by IV:
2020-04-28 07:40:39, DEBUG@VPN: 60b8ac7f aa36f7c2 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Skip to trim padding
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Decrypted packet:
2020-04-28 07:40:39, DEBUG@VPN: 1204b97c d5269773 45bbb278 f66d6b24 08102001 d5dedd08 00000034 00000014
08adb95e f4c49876 a251ab5b b89065ff 00000000 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Decrypt packet sucessful!
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ===============Receive===============
2020-04-28 07:40:39, DEBUG@VPN: ISAKMP Header Format:
....省略
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ================================
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Dump of above packet:
....省略
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Phase 2 (quick mode) : HASH(3) validate ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: HASH(3) generate ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: HASH(3) generate successful!
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: phase 2 (quick mode) : HASH(3) matched!
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 2 (quick mode) second msg receive END.++++++++
2020-04-28 07:40:39, DEBUG@VPN: 
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: Begin to compute KEYMAT ...
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: KEYMAT compute with
....省略
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: encklen=64 authklen=128
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: generating 384 bits of key (dupkeymat=3)
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: generating K1...K3 for KEYMAT.
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: KEYMAT compute with
....省略
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: encklen=64 authklen=128
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: generating 384 bits of key (dupkeymat=3)
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: generating K1...K3 for KEYMAT.
2020-04-28 07:40:39, DEBUG@VPN: [111.222.203.115]: KEYMAT computed successful!
2020-04-28 07:40:39, DEBUG@VPN: ===auto ike vpn track value sent to dplane===
2020-04-28 07:40:39, DEBUG@VPN: saindex 1516
2020-04-28 07:40:39, DEBUG@VPN: l2tp org src port 0
2020-04-28 07:40:39, DEBUG@VPN: l2tp local src port 25
2020-04-28 07:40:39, DEBUG@VPN: Vpn track enable: no
2020-04-28 07:40:39, DEBUG@VPN: Vpn track dst ip: 111.222.203.115
2020-04-28 07:40:39, DEBUG@VPN: Vpn track src ip: 222.111.105.103
2020-04-28 07:40:39, DEBUG@VPN: Vpn track interval: 10
2020-04-28 07:40:39, DEBUG@VPN: Vpn track threshold: 10
2020-04-28 07:40:39, DEBUG@VPN: Send IPSEC tunnel state change to active trap
2020-04-28 07:40:40, DEBUG@VPN: Adding NON-ESP marker
2020-04-28 07:40:40, DEBUG@VPN: Adding NON-ESP marker
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: respond new phase 2 negotiation: 222.111.105.103:500<=>111.222.203.115:500
2020-04-28 07:40:43, DEBUG@VPN: 
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 2 (quick mode) first msg receive START.++++++++
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: Begin decryption ...
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: IV was saved for next processing:
2020-04-28 07:40:43, DEBUG@VPN: 1a9f2910 1d05631b 
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: with key:
2020-04-28 07:40:43, DEBUG@VPN: 06058653 85632a13 
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: Decrypted payload by IV:
2020-04-28 07:40:43, DEBUG@VPN: f9349796 671f09f7 
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: Skip to trim padding
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: Decrypted packet:
....省略
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: Decrypt packet sucessful!
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: ===============Receive===============
2020-04-28 07:40:43, DEBUG@VPN: ISAKMP Header Format:
....省略
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: ================================
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: Dump of above packet:
....省略
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: phase 2 (quick mode) : received IDci2:
2020-04-28 07:40:43, DEBUG@VPN: 04000000 c0a80100 ffffff00 
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: phase 2 (quick mode) : received IDcr2:
2020-04-28 07:40:43, DEBUG@VPN: 04000000 0b0b0b00 ffffffe0 
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: phase 2 (quick mode) : Begin to HASH(1) validate ...
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: Phase 2 (quick mode) : HASH(1) matched.
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: phase2 handler negotiating already exists, ignore phase2 negotiation request
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: Just established one ,deny.
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: phase 2 (quick mode) : failed to get sainfo by ipsec doi id.
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 2 (quick mode) first msg receive END.++++++++
2020-04-28 07:40:43, DEBUG@VPN: 
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: failed to pre-process packet.
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: Begin encryption ...
2020-04-28 07:40:43, DEBUG@VPN: [111.222.203.115]: Encrypted successful!
2020-04-28 07:40:45, DEBUG@VPN: Adding NON-ESP marker
2020-04-28 07:40:45, DEBUG@VPN: Adding NON-ESP marker
2020-04-28 07:40:46, DEBUG@VPN: Adding NON-ESP marker
2020-04-28 07:40:46, DEBUG@VPN: Adding NON-ESP marker
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: respond new phase 2 negotiation: 222.111.105.103:500<=>111.222.203.115:500
2020-04-28 07:40:47, DEBUG@VPN: #二阶段第一个包开始接收
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 2 (quick mode) first msg receive START.++++++++
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Begin decryption ...
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: IV was saved for next processing:
2020-04-28 07:40:47, DEBUG@VPN: 1a9f2910 1d05631b 
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: with key:
2020-04-28 07:40:47, DEBUG@VPN: 06058653 85632a13 
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Decrypted payload by IV:
2020-04-28 07:40:47, DEBUG@VPN: f9349796 671f09f7 
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Skip to trim padding
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Decrypted packet:
....
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Decrypt packet sucessful!
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: ===============Receive===============
2020-04-28 07:40:47, DEBUG@VPN: ISAKMP Header Format:
....省略
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: ================================
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Dump of above packet:
....省略
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: phase 2 (quick mode) : received IDci2:
2020-04-28 07:40:47, DEBUG@VPN: 04000000 c0a80100 ffffff00 
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: phase 2 (quick mode) : received IDcr2:
2020-04-28 07:40:47, DEBUG@VPN: 04000000 0b0b0b00 ffffffe0 
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: phase 2 (quick mode) : Begin to HASH(1) validate ...
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Phase 2 (quick mode) : HASH(1) matched.
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: get a src address from ID payload 192.168.1.0:0 prefixlen=24 ul_proto=255
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: get dst address from ID payload 11.11.11.0:0 prefixlen=27 ul_proto=255
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Suitable SP found:192.168.1.0:0/24[ 11.11.11.0:0/27[ proto=any dir=in
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]:  (proto_id=ESP spisize=4 spi=00000000 spi_p=00000000 encmode=Tunnel reqid=0:0)
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]:   (trns_id=DES encklen=0 authtype=hmac-md5)
2020-04-28 07:40:47, DEBUG@VPN: life duration was in TLV.
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Begin compare proposals
2020-04-28 07:40:47, DEBUG@VPN: prop#=0 prot-id=ESP spi-size=4 #trns=1 trns#=1 trns-id=DES
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Begin to compare my and peer's proposal ...
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Peer's single bundle:
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]:  (proto_id=ESP spisize=4 spi=c67f2f16 spi_p=00000000 encmode=Tunnel reqid=0:0)
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]:   (trns_id=DES encklen=0 authtype=hmac-md5)
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: My single bundle:
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]:  (proto_id=ESP spisize=4 spi=00000000 spi_p=00000000 encmode=Tunnel reqid=0:0)
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]:   (trns_id=DES encklen=0 authtype=hmac-md5)
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Matched
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 2 (quick mode) first msg receive END.++++++++
2020-04-28 07:40:47, DEBUG@VPN: #二阶段第一个包接收完毕
2020-04-28 07:40:47, DEBUG@VPN: #二阶段第一个包开始发送
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: +++++++Phase 2 (quick mode) first msg send START.++++++++
2020-04-28 07:40:47, DEBUG@VPN: life duration was in TLV.
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: ===============Send===============
2020-04-28 07:40:47, DEBUG@VPN: ISAKMP Header Format:
....省略
2020-04-28 07:40:47, DEBUG@VPN: ================================
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Dump of above packet:
....省略
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Begin encryption ...
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Encrypted successful!
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: resend phase2 packet 1204b97cd5269773:45bbb278f66d6b24:0X31e36627
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: +++++++Phase 2 (quick mode) first msg send END.++++++++
2020-04-28 07:40:47, DEBUG@VPN: #二阶段第一个包发送完毕
2020-04-28 07:40:47, DEBUG@VPN: #二阶段第二个包开始接收
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 2 (quick mode) second msg receive START.++++++++
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Begin decryption ...
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: IV was saved for next processing:
2020-04-28 07:40:47, DEBUG@VPN: 7a53a98a cd8225bf 
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: with key:
2020-04-28 07:40:47, DEBUG@VPN: 06058653 85632a13 
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Decrypted payload by IV:
2020-04-28 07:40:47, DEBUG@VPN: c70e9c0b 837d6de7 
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Skip to trim padding
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Decrypted packet:
2020-04-28 07:40:47, DEBUG@VPN: 1204b97c d5269773 45bbb278 f66d6b24 08102001 31e36627 00000034 00000014
7334de6b 349d6716 89c19607 d4a0458f 00000000 
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Decrypt packet sucessful!
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: ===============Receive===============
2020-04-28 07:40:47, DEBUG@VPN: ISAKMP Header Format:
....省略
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: ================================
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Dump of above packet:
....省略
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Phase 2 (quick mode) : HASH(3) validate ...
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: HASH(3) generate ...
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: HASH(3) generate successful!
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: phase 2 (quick mode) : HASH(3) matched!
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: ++++++++Phase 2 (quick mode) second msg receive END.++++++++
2020-04-28 07:40:47, DEBUG@VPN: #2阶段快读模式第二个包接收完毕
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: Begin to compute KEYMAT ...
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: KEYMAT compute with
....省略
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: encklen=64 authklen=128
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: generating 384 bits of key (dupkeymat=3)
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: generating K1...K3 for KEYMAT.
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: KEYMAT compute with
....省略
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: encklen=64 authklen=128
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: generating 384 bits of key (dupkeymat=3)
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: generating K1...K3 for KEYMAT.
2020-04-28 07:40:47, DEBUG@VPN: [111.222.203.115]: KEYMAT computed successful!
2020-04-28 07:40:47, DEBUG@VPN: ===auto ike vpn track value sent to dplane=== #到这里,隧道起来了

剩下的应该就是写路由的事了,最困难的地方已经过去了

 

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

openwrt18.06.4配置strongswan对接山石网科(hillstone)记录① 的相关文章

  • Qt 嵌入式触摸屏 QMouseEvents 在收到 MouseButtonRelease 之前未收到

    我在带有触摸屏的小型 ARM 嵌入式 Linux 设备上使用 Qt 4 8 3 我的触摸屏配置了 tslib 并对其进行了校准 因此 etc 中有一个 pointcal 文件 我的触摸事件的位置工作得很好 但无论如何我都会在鼠标按下或鼠标释
  • 如何通过 makefile 在 Linux 上安装程序? [复制]

    这个问题在这里已经有答案了 可能的重复 Linux Unix make install 应该包含什么 https stackoverflow com questions 528399 what should linux unix make
  • php run git 收到“ssh 权限被拒绝”

    我正在尝试从浏览器中运行 git pull php 脚本 但我得到了 sh 连接到主机 git assembla com 端口 22 权限被拒绝 我的 PHP 脚本
  • 选择fasta文件中氨基酸超过300个且“C”出现至少4次的序列

    我有一个包含蛋白质序列的 fasta 文件 我想选择超过 300 个氨基酸且半胱氨酸 C 氨基酸出现超过 4 次的序列 我使用此命令来选择具有超过 300 个 aa 的序列 cat 72hDOWN fasta fasta bioawk c
  • Linux中如何避免sleep调用因信号而中断?

    我在 Linux 中使用实时信号来通知串行端口中新数据的到达 不幸的是 这会导致睡眠呼叫在有信号时被中断 有人知道避免这种行为的方法吗 我尝试使用常规信号 SIGUSR1 但我不断得到相同的行为 来自 nanosleep 联机帮助页 nan
  • 使用脚本检查 git 分支是否领先于另一个分支

    I have branch1 and branch2我想要某种 git branch1 isahead branch2 这将显示如果branch1已承诺branch2没有 也可能指定这些提交 我无法检查差异原因branch2 is在之前br
  • bash 将输出重定向到文件,但结果不完整

    重定向命令输出的问题已经被问过很多次了 但是我有一个奇怪的行为 我使用的是 bash shell debian 版本 4 3 30 1 release 并尝试将输出重定向到文件 但并非所有内容都记录在文件中 我尝试运行的 bin 文件是 l
  • 为什么此 NASM 代码会打印我的环境变量?

    本学期我刚刚完成计算机体系结构课程 除其他外 我们一直在涉足 MIPS 汇编并在 MARS 模拟器中运行它 今天 出于好奇 我开始在我的 Ubuntu 机器上摆弄 NASM 基本上只是将教程中的内容拼凑起来 并感受一下 NASM 与 MIP
  • Crontab 每 5 分钟一次 [关闭]

    Closed 这个问题是无关 help closed questions 目前不接受答案 我如何告诉 crontab 每 5 分钟运行一次 但从每小时的第二分钟开始 换句话说 我想在以下时间执行我的脚本minute 5 2 例如 我的脚本应
  • 是否可以让 Capistrano 通过反向 SSH 隧道进行结帐?

    我正在开发一个驻留在公共主机上的应用程序 但我必须将其源代码保存在公司防火墙后面的 Git 存储库中 我越来越very厌倦了通过缓慢的部署scp 复制整个存储库并在每次部署时通过 SSH 传送 并且希望远程主机只需执行git pull更新
  • 如何从 C++ 程序中重新启动 Linux?

    我有一个 Qt 4 GUI 我需要在下拉菜单中提供一个选项 允许用户选择重新启动计算机 我意识到这对于以其他方式重新启动计算机的能力来说似乎是多余的 但选择需要保留在那里 我尝试使用 system 来调用以下内容 suid root she
  • 为 Linux 编译 Objective-C 应用程序(API 覆盖范围)

    我可能在这里问一些奇怪的问题 但我不确定从哪里开始 问题是我正在考虑使用 Obj C 和 Foundation 类在 Mac 上编写一个命令行工具 但存在一个非常大的风险 那就是我希望能够为不同的 Linux 发行版编译它 以便将来作为服务
  • gitlab 上的权限被拒绝(公钥)

    我的问题是我无法从 GitLab 推送或获取 不过 我可以克隆 通过 HTTP 或通过 SSH 当我尝试推送时出现此错误 权限被拒绝 公钥 致命 无法从远程存储库读取 从我看过的所有线程中 这是我所做的 在我的计算机上设置 SSH 密钥并将
  • grep 排除文件的数组参数

    我想从我的文件中排除一些文件grep命令 为此我使用参数 exclude excluded file ext 为了更容易阅读 我想使用包含排除文件的 bash 数组 EXCLUDED FILES excluded file ext 然后将
  • 如何为 VS Code SSH Remote 配置不同的 shell?

    当我连接到 VS Code 集成终端时 如何更改使用的 shell远程 ssh 工作区 https code visualstudio com docs remote ssh 添加 Matt Bierner 的答案 较新的版本vscode现
  • 如何从 ssh 配置文件中删除主机条目?

    文件的标准格式是 Host example HostName example com Port 2222 Host example2 Hostname two example com Host three example com Port
  • ioctl 命令的用户权限检查

    我正在实现 char 驱动程序 Linux 并且我的驱动程序中有某些 IOCTL 命令仅需要由 ADMIN 执行 我的问题是如何在 ioctl 命令实现下检查用户权限并限制非特权用户访问 IOCTL 您可以使用bool capable in
  • 为什么 Linux 原始套接字的 RX 环大小限制为 4GB?

    背景 我试图mmap 我的原始套接字的 RX 环形缓冲区64 bitLinux 应用程序 我的环由 4096 个块组成 每个块大小为 1MB 总共 4GB 请注意 每个 1MB 块中可以有许多帧 如果您好奇 请参阅此文档了解背景信息 htt
  • 仅使用containerd(不使用Docker)修剪容器镜像

    如果我刚刚containerd安装在 Linux 系统上 即 Docker 是not安装 如何删除未使用的容器映像以节省磁盘空间 Docker 就是这么方便docker system prune https docs docker com
  • 相当于Linux中的导入库

    在 Windows C 中 当您想要链接 DLL 时 您必须提供导入库 但是在 GNU 构建系统中 当您想要链接 so 文件 相当于 dll 时 您就不需要链接 为什么是这样 是否有等效的 Windows 导入库 注意 我不会谈论在 Win

随机推荐

  • 面试题记1

    希望各位看客们能积极提供答案 1 125874和它的两倍251748 包含着同样的数字 只是顺序不同 找出最小的正整数x 使得2x 3x 4x 5x 和6x都包含有相同的数字 2 求100 各位数之和 3 是用从1到9所有数字 将其任意的连
  • Notion?Roam?OneNote? 不要再用这些垃圾做笔记啦

    双向链接 最近因为Roam Research 双向链接在笔记圈子里火了起来 Notion也在准备做了 那么双向链接是什么呢 我用我的我关于管道的一则笔记给大家讲明白 管道的实现 Linux里 管道实现的原理是 Shell进程先调用pipe创
  • 浅谈 qmake 之 shadow build

    shadow build shadow build 是什么东西 就是将源码路径和构建路径分开 也就是生成的makefile文件和其他产物都不放到源码路径 以此来保证源码路径的清洁 这不是qmake独创的东西 cmake中早就使用这个东西了
  • 性能测试_Day_10(负载测试-获得最大可接受用户并发数)

    目录 如何理解负载测试 如何实现负载测试 jpgc Standard Set插件安装 jpgc Standard Set使用方法 负载测试分析指标 获得最大可接受用户并发数 区间值 负载测试分析指标 获得最大可接受用户并发数 真实值 负载测
  • 阅读论文《Deep Bilateral Learning for Real-Time Image Enhancement》

    这是2017 siggraph的一篇论文 寒假boss让我看这篇论文我没怎么看懂 最近在公司实习 发现该论文的成果已经移到手机端上了 效果还非常不错 这里我重新温习了一下这篇论文 发现有许多可以借鉴的地方 是一篇非常不错的论文 这里重新叙述
  • 我碰到avs错误

    1 写好的avs脚本用播发器不能播放 并且报unexpected chatacter 错误 解决办法 1 尽管avs支持汉语文件路径 但是仍要确认标点符号是否为英文状态下 2 将AVS脚本用记事本打开 重新存为并把编码格式修改成ASNI格式
  • 数值计算方法python实现

    包括 泰勒级数展开 差分逼近微分 二分法求解 试位法求解 迭代法求根 牛顿法求根 正割法 贝尔斯托法多项式求跟 多项式回归 牛顿差商插值 拉格朗日插值法 三次样条插值法 二次样条插值法 高斯消元法 求解线性代数方程组 代码在我的github
  • 事件循环与线程 一

    初次读到这篇文章 译者感觉如沐春风 深刻体会到原文作者是花了很大功夫来写这篇文章的 文章深入浅出 相信仔细读完原文或下面译文的读者一定会有收获 由于原文很长 原文作者的行文思路是从事件循环逐渐延伸到线程使用的讨论 译者因时间受限 暂发表有关
  • SnowFlake 算法

    SnowFlake 算法 1 介绍 是 Twitter 开源的分布式 id 生成算法 核心思想 使用一个 64 bit 的 long 型的数字作为全局唯一 id 2 结构 0 0001000000 0000010000 0001000100
  • KVM架构与原理详解

    1 KVM架构 KVM 基本上有两个组件构成 1 kvm 驱动 现在已经是Linux内核的一个模块了 它的作用主要是负责虚拟机的创建 虚拟内存的分配 虚拟CPU寄存器的读写和虚拟cpu的运行 2 另一个组件是 Qemu QEMU是一个通用的
  • Wsl2 Ubuntu18.04图形化界面,亲测成功

    Wsl2 Ubuntu18 04图形化界面 亲测成功 Windows端 Linux端 最后 抖抖索索搞了两天 差点Windows系统都重装 终于搞成功了 参考文献 一定要看 非常感谢这个哥们 成功搞出来了 Windows端 powershe
  • ThreadLoacl

    目录 三 ThreadLoacl 基础 二 InheritableThreadLocal 三 TransmittableThreadLocal 三 ThreadLoacl 基础 在Java的多线程编程中 为保证多个线程对共享变量的安全访问
  • 数据库配置时useUnicode=true&characterEncoding=UTF-8

    数据库连接时经常会写到 jdbc url jdbc mysql localhost 3306 db1 useUnicode true characterEncoding UTF 8 添加的作用是 指定字符的编码 解码格式 例如 mysql数
  • mvvm设计模式总结

    要了解mvvm 首先要了解mvc和mvp 我们也先简单说一下mvc和mvp MVC MVC全名是Model View Controller 是模型 model 视图 view 控制器 controller 的缩写 一种软件设计典范 用一种业
  • HyperLedger Fabric实战(一):基础环境构建

    1 简介 本文档说明了HyperLedger Fabric 1 4 0版本的区块链网络搭建所需的基本环境组件以及安装流程 最后再记录了安装过程中可能会遇到的一些问题 采用的操作系统为ubuntu 18 04 具有参考价值的网站 Hyperl
  • PAT初级1015德才论(C++)

    PAT初级1015德才论 C 代码 include
  • FreeRtos队列,队列集合学习使用

    我们都知道队列可以进行消息的管理 比如在一个task中发消息 另一个task监听队列中是否有消息 这样比读flag的效率要高很多 更好的利用资源 一 介绍一下接下来需要使用到的接口函数 创建队列 使用的是xQueueCreate uxQue
  • Redis-入门与springboot整合

    Redis入门 一 Redis基础命令 二 常用数据类型 1 String类型 2 List类型 3 Set集合 4 hash集合 5 Zset集合 三 Redis发布和订阅 四 新数据类型 1 Bitmaps 2 HyperLogLog
  • Java常用类:System类

    文章目录 System类概述 1 arraycopy 方法 概述 语法 举例 2 currentTimeMillis 方法 概述 语法 举例 3 gc 方法 概述 语法 举例 4 exit int status 方法 概述 语法 举例 Sy
  • openwrt18.06.4配置strongswan对接山石网科(hillstone)记录①

    首先感谢https blog csdn net d9394952 article details 90734469 原贴作者 摸索了一个礼拜 将过程记录如下 首先将路由器连上网 更新opkg root OpenWrt ping www ba