Linux/cisco anyconnect:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
 
第31行: 第31行:
     network-manager-openconnect-gnome \
     network-manager-openconnect-gnome \
     resolvconf</syntaxhighlight>|$|/home/kangkk}}
     resolvconf</syntaxhighlight>|$|/home/kangkk}}
== error ==
查看所有服务
{{Shc_out|<syntaxhighlight lang="bash">
service --status-all</syntaxhighlight>|<syntaxhighlight lang="bash"> [ + ]  acpid
[ - ]  alsa-utils
[ - ]  anacron
[ + ]  apparmor
[ + ]  apport
[ + ]  avahi-daemon
[ + ]  bluetooth
[ - ]  console-setup.sh
[ + ]  cron
[ + ]  cups
[ + ]  cups-browsed
[ + ]  dbus
[ + ]  gdm3
[ + ]  grub-common
[ - ]  hwclock.sh
[ + ]  irqbalance
[ + ]  kerneloops
[ - ]  keyboard-setup.sh
[ + ]  kmod
[ + ]  network-manager
[ + ]  openvpn
[ - ]  plymouth
[ - ]  plymouth-log
[ - ]  pppd-dns
[ + ]  procps
[ - ]  pulseaudio-enable-autospawn
[ - ]  rsync
[ + ]  rsyslog
[ - ]  saned
[ - ]  speech-dispatcher
[ - ]  spice-vdagent
[ + ]  udev
[ + ]  ufw
[ + ]  unattended-upgrades
[ - ]  uuidd
[ + ]  whoopsie
[ - ]  x11-common
</syntaxhighlight>|$|/home/kangkk}}
查看 vpnagentd
{{Shc_out|<syntaxhighlight lang="bash">
ps -elf | grep vpnagentd</syntaxhighlight>|<syntaxhighlight lang="bash">4 S root        842      1  0  80  0 - 116975 -    14:07 ?        00:00:00 /opt/cisco/anyconnect/bin/vpnagentd -execv_instance
0 S kangkk    10589  10318  0  80  0 -  4419 pipe_r 14:24 pts/1    00:00:00 grep --color=auto vpnagentd
</syntaxhighlight>|$|/home/kangkk}}
查看服务
{{Shc_out|<syntaxhighlight lang="bash">
systemctl status vpnagentd</syntaxhighlight>|<syntaxhighlight lang="bash">● vpnagentd.service - Cisco AnyConnect Secure Mobility Client Agent
    Loaded: loaded (/lib/systemd/system/vpnagentd.service; enabled; vendor preset: enabled)
    Active: active (running) since Fri 2021-05-07 14:07:27 CST; 27min ago
  Main PID: 842 (vpnagentd)
      Tasks: 5 (limit: 47828)
    Memory: 25.7M
    CGroup: /system.slice/vpnagentd.service
            └─842 /opt/cisco/anyconnect/bin/vpnagentd -execv_instance
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: logResolutionResult File: ../../vpn/Common/Utility/HostLocator.cpp Line: 927 Host vpn.qihoo.net has been resolved to IP address 111.206.66.132
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Writing to hosts file:  111.206.66.132        vpn.qihoo.net ###Cisco AnyConnect VPN client modified this file. Please do not modify contents until this commen>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: respondToConnectNotification File: ../../vpn/Agent/MainThread.cpp Line: 6108 The requested VPN connection to vpn.qihoo.net will target the following>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: The client's public address is now set to 10.17.37.127
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: determineAcidexMacAddrMapForTlv File: ../../vpn/Agent/MainThread.cpp Line: 6455 [ACIDEX] Determined public interface MAC address 58-96-1d-d7-d6-ce (>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: internalReadSocket File: ../../vpn/Common/IPC/UdpTcpTransports_unix.cpp Line: 531 Invoked Function: ::read Return Code: -31588336 (0xFE1E0010) Descr>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: callbackHandler File: ../../vpn/Common/IPC/SocketTransport.cpp Line: 1885 Invoked Function: CSocketTransport::internalReadSocket Return Code: -31588>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: OnSocketReadComplete File: ../../vpn/Common/IPC/IPCTransport.cpp Line: 953 Invoked Function: CSocketTransport::readSocket Return Code: -31588336 (0x>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: OnIpcMessageReceived File: ../../vpn/Common/IPC/IPCDepot.cpp Line: 1195 Invoked Function: CIpcTransport::OnSocketReadComplete Return Code: -31588336>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: The client's potential public address list is now set to 10.17.37.127, 2405:A900:FFEE:257:EE5E:BA3D:BB0F:BCCA
</syntaxhighlight>|$|/home/kangkk}}

2021年5月7日 (五) 08:11的最新版本

引言

安装

下载压缩包 anyconnect-linux64-4.9.00086-predeploy-k9.tar.gz,解压后可以看到四个文件夹爱 dart、nvm、posture、vpn,进入 vpn 文件夹并运行安装脚本 vpn_install.sh。

1. 安装 vpn。遇到错误

[jian@kang /home/kangkk]$
./vpn_install.sh
Installing Cisco AnyConnect Secure Mobility Client...
Sorry, you need super user privileges to run this script.

判断用户权限脚本的代码

[jian@kang /home/kangkk]$
sudo id | sed -e 's/(.*//'
用户id=0

由于安装脚本没有考虑中文环境,所以判断权限出错。执行下面代码:

[jian@kang /home/kangkk]$
sudo env LANGUAGE=en ./vpn_install.sh

Done.

替代

Openconnect

/home/kangkk
sudo apt-get install -y \
    openconnect libopenconnect-dev \
    network-manager-openconnect-gnome \
    resolvconf

error

查看所有服务

[jian@kang /home/kangkk]$
service --status-all
 [ + ]  acpid
 [ - ]  alsa-utils
 [ - ]  anacron
 [ + ]  apparmor
 [ + ]  apport
 [ + ]  avahi-daemon
 [ + ]  bluetooth
 [ - ]  console-setup.sh
 [ + ]  cron
 [ + ]  cups
 [ + ]  cups-browsed
 [ + ]  dbus
 [ + ]  gdm3
 [ + ]  grub-common
 [ - ]  hwclock.sh
 [ + ]  irqbalance
 [ + ]  kerneloops
 [ - ]  keyboard-setup.sh
 [ + ]  kmod
 [ + ]  network-manager
 [ + ]  openvpn
 [ - ]  plymouth
 [ - ]  plymouth-log
 [ - ]  pppd-dns
 [ + ]  procps
 [ - ]  pulseaudio-enable-autospawn
 [ - ]  rsync
 [ + ]  rsyslog
 [ - ]  saned
 [ - ]  speech-dispatcher
 [ - ]  spice-vdagent
 [ + ]  udev
 [ + ]  ufw
 [ + ]  unattended-upgrades
 [ - ]  uuidd
 [ + ]  whoopsie
 [ - ]  x11-common

查看 vpnagentd

[jian@kang /home/kangkk]$
ps -elf | grep vpnagentd
4 S root         842       1  0  80   0 - 116975 -     14:07 ?        00:00:00 /opt/cisco/anyconnect/bin/vpnagentd -execv_instance
0 S kangkk     10589   10318  0  80   0 -  4419 pipe_r 14:24 pts/1    00:00:00 grep --color=auto vpnagentd


查看服务

[jian@kang /home/kangkk]$
systemctl status vpnagentd
● vpnagentd.service - Cisco AnyConnect Secure Mobility Client Agent
     Loaded: loaded (/lib/systemd/system/vpnagentd.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2021-05-07 14:07:27 CST; 27min ago
   Main PID: 842 (vpnagentd)
      Tasks: 5 (limit: 47828)
     Memory: 25.7M
     CGroup: /system.slice/vpnagentd.service
             └─842 /opt/cisco/anyconnect/bin/vpnagentd -execv_instance

5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: logResolutionResult File: ../../vpn/Common/Utility/HostLocator.cpp Line: 927 Host vpn.qihoo.net has been resolved to IP address 111.206.66.132
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Writing to hosts file:  111.206.66.132        vpn.qihoo.net ###Cisco AnyConnect VPN client modified this file. Please do not modify contents until this commen>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: respondToConnectNotification File: ../../vpn/Agent/MainThread.cpp Line: 6108 The requested VPN connection to vpn.qihoo.net will target the following>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: The client's public address is now set to 10.17.37.127
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: determineAcidexMacAddrMapForTlv File: ../../vpn/Agent/MainThread.cpp Line: 6455 [ACIDEX] Determined public interface MAC address 58-96-1d-d7-d6-ce (>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: internalReadSocket File: ../../vpn/Common/IPC/UdpTcpTransports_unix.cpp Line: 531 Invoked Function: ::read Return Code: -31588336 (0xFE1E0010) Descr>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: callbackHandler File: ../../vpn/Common/IPC/SocketTransport.cpp Line: 1885 Invoked Function: CSocketTransport::internalReadSocket Return Code: -31588>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: OnSocketReadComplete File: ../../vpn/Common/IPC/IPCTransport.cpp Line: 953 Invoked Function: CSocketTransport::readSocket Return Code: -31588336 (0x>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: Function: OnIpcMessageReceived File: ../../vpn/Common/IPC/IPCDepot.cpp Line: 1195 Invoked Function: CIpcTransport::OnSocketReadComplete Return Code: -31588336>
5月 07 14:18:52 rog-ubuntu acvpnagent[842]: The client's potential public address list is now set to 10.17.37.127, 2405:A900:FFEE:257:EE5E:BA3D:BB0F:BCCA