Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.1k views
in Technique[技术] by (71.8m points)

OpenVPN unable to reach local network while connected

I'm currently unable to access my local network while I'm connected to the OpenVPN server. This issue is present since I changed the underlining network of the client that connects to the openvpn server

actually the following option as always worked for me at the client config:

route 10.42.0.0 255.255.0.0 net_gateway
route 10.43.0.0 255.255.0.0 net_gateway

Well not anymore it seems. I'm already digging for hours but I was not able to find a solution yet, see my full config options:

auth-user-pass
client
dev tun
hand-window 120
inactive 604800
mute-replay-warnings
nobind
persist-key
persist-remote-ip
persist-tun
ping 5
ping-restart 120
redirect-gateway def1
remote-random
reneg-sec 3600
resolv-retry 60
route-delay 2
route-method exe
script-security 2
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA:TLS-DHE-RSA-WITH-AES-256-CBC-SHA:TLS-RSA-WITH-CAMELLIA-256-CBC-SHA:TLS-RSA-WITH-AES-256-CBC-SHA
tls-timeout 5
verb 4
tun-mtu  1500
proto udp
fragment 1300
mssfix
comp-lzo
key-direction 1
cipher AES-256-GCM
auth SHA512
ignore-unknown-option ncp-disable
ncp-disable
remote-cert-tls server


pull-filter ignore ifconfig-ipv6
pull-filter ignore route-ipv6
pull-filter ignore comp-lzo
pull-filter ignore "redirect-gateway def1 ipv6"
pull-filter ignore "dhcp-option DNS"
route 10.42.0.0 255.255.0.0 net_gateway
route 10.43.0.0 255.255.0.0 net_gateway
...

The client is not Ipv6 capeable so I removed that options a while ago. At my oprnvpn log I see the following issue:

2021-01-23 04:33:02 us=409604 do_ifconfig, ipv4=1, ipv6=0
2021-01-23 04:33:02 us=409631 net_iface_mtu_set: mtu 1500 for tun0
2021-01-23 04:33:02 us=409674 net_iface_up: set tun0 up
2021-01-23 04:33:02 us=409751 net_addr_v4_add: 10.0.194.60/24 dev tun0
2021-01-23 04:33:04 us=483688 net_route_v4_add: 178.162.194.30/32 via 10.42.240.0 dev [NULL] table 0 metric -1
2021-01-23 04:33:04 us=483917 net_route_v4_add: 0.0.0.0/1 via 10.0.194.2 dev [NULL] table 0 metric -1
2021-01-23 04:33:04 us=483958 net_route_v4_add: 128.0.0.0/1 via 10.0.194.2 dev [NULL] table 0 metric -1
2021-01-23 04:33:04 us=483991 net_route_v4_add: 10.42.0.0/16 via 10.42.240.0 dev [NULL] table 0 metric -1
2021-01-23 04:33:04 us=484023 net_route_v4_add: 10.43.0.0/16 via 10.42.240.0 dev [NULL] table 0 metric -1
2021-01-23 04:33:04 us=484062 sitnl_send: rtnl: generic error (-101): Network is unreachable
2021-01-23 04:33:04 us=484078 ERROR: Linux route add command failed
2021-01-23 04:33:04 us=484109 Initialization Sequence Completed

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...