首页 > 解决方案 > Openvpn Invalid Previx Length and RTNETLINK 答案:文件存在

问题描述

我工作的公司刚刚切换了他们的 vpn。他们给我发了一个新配置,看起来几乎和旧配置一样——我可以连接到 VPN,但没有任何东西通过 VPN 路由。我沿着这条路走,假设它与我的客户端文件中的路线有关。这是我到目前为止所拥有的,感谢您的帮助和指向正确答案的指针-

我已经隐藏/更改了所有 IPS

  1. 客户端配置
#-- Configuration Generated By Viscosity --#

#viscosity startonopen true
#viscosity usepeerdns true
#viscosity dns automatic
#viscosity protocol openvpn
#viscosity dnsserver xx.x.x.xxx
#viscosity autoreconnect true
#viscosity dnssupport true
#viscosity name "PetrichorVPN New"
#viscosity dhcp true
remote 123.123.12.123 1234 tcp-client
nobind 
dev tun
persist-tun 
persist-key 
compress lzo
pull 
auth-user-pass 
tls-client 
ca ca.crt
cert cert.crt
key key.key
route 123.12.12.123 255.255.255.255 net_gateway default
route-ipv6 1234:124:1243:1243::1/127 default default
sndbuf 323416
rcvbuf 323416
resolv-retry infinate
comp-lzo adaptive
  1. OpenVPN 连接时出现 3 个错误
Fri Jul  9 21:18:07 2021 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Fri Jul  9 21:18:07 2021 TCP/UDP: Preserving recently used remote address: [AF_INET]123.123.12.123:1234
Fri Jul  9 21:18:07 2021 Attempting to establish TCP connection with [AF_INET]123.123.12.123:1234 [nonblock]
Fri Jul  9 21:18:08 2021 TCP connection established with [AF_INET]123.123.12.123:1243
Fri Jul  9 21:18:08 2021 TCP_CLIENT link local: (not bound)
Fri Jul  9 21:18:08 2021 TCP_CLIENT link remote: [AF_INET]123.123.12.123:1234
Fri Jul  9 21:18:08 2021 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Fri Jul  9 21:18:08 2021 WARNING: 'cipher' is present in local config but missing in remote config, local='cipher BF-CBC'
Fri Jul  9 21:18:08 2021 [server] Peer Connection Initiated with [AF_INET]123.123.12.123:1234
Fri Jul  9 21:18:09 2021 TUN/TAP device tun0 opened
Fri Jul  9 21:18:09 2021 /sbin/ip link set dev tun0 up mtu 1500
Fri Jul  9 21:18:09 2021 /sbin/ip addr add dev tun0 local 12.1.1.12 peer 13.5.1.13
Fri Jul  9 21:18:09 2021 /sbin/ip -6 addr add 1234::1234:1234:0:5/112 dev tun0
Error: Invalid prefix for given prefix length.
Fri Jul  9 21:18:09 2021 ERROR: Linux route add command failed: external program exited with error status: 2
RTNETLINK answers: File exists
Fri Jul  9 21:18:09 2021 ERROR: Linux route add command failed: external program exited with error status: 2
Fri Jul  9 21:18:09 2021 add_route_ipv6(1234:1234:1234:1234::/127 -> 1234::1243:1234:1 metric -1) dev tun0
Fri Jul  9 21:18:09 2021 add_route_ipv6(2341:2341:1341:df2::/64 -> 1244::1234:1234:0:1 metric -1) dev tun0
Fri Jul  9 21:18:09 2021 add_route_ipv6(1244:1244:1234:2fa::/64 -> 1234::1234:1234:0:1 metric -1) dev tun0
Fri Jul  9 21:18:09 2021 add_route_ipv6(1244:1234:1234:f24::/64 -> 1234::1234:1244:0:1 metric -1) dev tun0
Fri Jul  9 21:18:09 2021 add_route_ipv6(2444:1345:1244:1234::/127 -> 1234::1244:1234:0:1 metric -1) dev tun0
RTNETLINK answers: File exists
Fri Jul  9 21:18:09 2021 ERROR: Linux route -6/-A inet6 add command failed: external program exited with error status: 2
Fri Jul  9 21:18:09 2021 add_route_ipv6(1204:1234:2000:b400::/56 -> 1234::1234:1234:0:1 metric -1) dev tun0
Fri Jul  9 21:18:09 2021 add_route_ipv6(3432:3423:0:e900::/56 -> 1234::1234:1234:0:1 metric -1) dev tun0
Fri Jul  9 21:18:09 2021 add_route_ipv6(2342:2343:1020:9230::/56 -> 1234::1234:1234:0:1 metric -1) dev tun0
Fri Jul  9 21:18:09 2021 Initialization Sequence Completed
  1. ip r -- 我要连接的地址在这里。

--

不知道还有什么要分享或如何去做,任何帮助都可以得到!

运行 ubuntu 20.10/Pop 操作系统

标签: openvpn

解决方案


推荐阅读