我的Ubuntu18.04机器上有Cisco Annyconnect。我还插入了一个嵌入式Linux板,我需要连接到over。
但是,每当我连接到我的虚拟专用网时,我就不能再和我的本地板交谈了(ping 10.1.2.3与连接的VPN失败了,ssh root@10.1.2.3也是一样)。如何仅禁用此板的VPN,使与此本地板对话的接口不通过VPN?
示例信息:
ifconfig所示):enxf8e43b9df77610.1.2.1255.255.255.010.1.2.3255.255.255.0这对我不管用:是否有可能停止在某些应用程序上使用VPN?
我需要能够使用VPN连接到一些远程网络,同时使用我的本地嵌入式Linux板。
grep -rn 'LocalLanAccess' /opt/ciscogrep -rn '我需要尝试这一点;这就是黑客!-构建一个自定义函数,C++名称-mangling等等!--并在库加载时预加载它,以便用该名称覆盖内部函数:超级用户:如何允许本地局域网访问,同时连接到思科VPN?。OpenConnect --一种尝试的替代方案,它显然与Cisco AnyConnect 兼容。https://gitlab.com/openconnect/openconnecthttp://www.infradead.org/openconnect/以下是我做的一些没有解决问题或有用的事情(至少现在还没有):
grep -rn 'LocalLanAccess' /opt/cisco
$ grep -rn 'LocalLanAccess' /opt/cisco
/opt/cisco/anyconnect/.anyconnect_global:15:false
Binary file /opt/cisco/anyconnect/lib/libvpnapi.so matches
Binary file /opt/cisco/anyconnect/lib/libvpnagentutilities.so matches
/opt/cisco/anyconnect/profile/vpn_profile.xml:15: false
/opt/cisco/anyconnect/profile/AnyConnectProfile.xsd:325:
cp -i /opt/cisco/anyconnect/.anyconnect_global /opt/cisco/anyconnect/.anyconnect_global.bak
cp -i /opt/cisco/anyconnect/profile/vpn_profile.xml /opt/cisco/anyconnect/profile/vpn_profile.xml.bak
cp -i /opt/cisco/anyconnect/profile/AnyConnectProfile.xsd /opt/cisco/anyconnect/profile/AnyConnectProfile.xsd.bak
# manually update all 3 files to true
$ grep -rn 'LocalLanAccess' /opt/cisco
/opt/cisco/anyconnect/.anyconnect_global:15:true
Binary file /opt/cisco/anyconnect/lib/libvpnapi.so matches
Binary file /opt/cisco/anyconnect/lib/libvpnagentutilities.so matches
/opt/cisco/anyconnect/profile/vpn_profile.xml:15: true
/opt/cisco/anyconnect/profile/AnyConnectProfile.xsd:325: 发布于 2022-11-16 21:48:50
解决了!
而是通过openconnect包装器使用openconnect-sso!思科AnyConnect故意阻止局域网访问。
openconnect-sso的基本用法:
VPN_SERVER_ADDRESS="myvpn.whatever.com" # example server address to connect to
VPN_SAML_GROUP="whatever-saml-whatever" # example SAML group name
VPN_USER="my.username@something.com" # example username
# or perhaps just this for the username:
# VPN_USER="my.username"
# connect via `openconnect-sso`
# The first time ever, you must specify everything
openconnect-sso --server "${VPN_SERVER_ADDRESS}/${VPN_SAML_GROUP}" --user "${VPN_USER}"
# Subsequent connection attempts can be done with just this, since apparently
# the server address, SAML group, and username are cached after the first usage
openconnect-sso有关full的详细信息、屏幕截图和安装说明,请参见我的回答:如何使用"openconnect“(通过openconnect-sso),通过Okta单点登录(SSO)进行双因素身份验证。
https://askubuntu.com/questions/1437348
复制相似问题