OpenVPN ROUTE: failed to parse/resolve route for host/network

Метки: Centos, openvpn, routing

ошибка: OpenVPN ROUTE: failed to parse/resolve route for host/network

не смог найти ответов в интернете, оказалось все просто:

server:
LAN 192.168.45.0/24
OVPN 10.10.40.1/30
client:
LAN 192.168.4.0/23
OVPN 10.10.40.2/30

чтобы маршруты прописывались после коннекта и убирались после дисконнекта надо прописать строку в конфиг сервера и клиента:

на сервере:
route 192.168.4.0 255.255.254.0 10.10.40.2 1
на клиенте:
route 192.168.45.0 255.255.255.0 10.10.40.1 1

выдержка из мануала:

--route network/IP [netmask] [gateway] [metric]
Add route to routing table after connection is established. Multiple routes can be specified. Routes will be automatically torn down in reverse order prior
to TUN/TAP device close.

This option is intended as a convenience proxy for the route(8) shell command, while at the same time providing portable semantics across OpenVPN's platform
space.

netmask default -- 255.255.255.255

gateway default -- taken from --route-gateway or the second parameter to --ifconfig when --dev tun is specified.

metric default -- taken from --route-metric otherwise 0.

The default can be specified by leaving an option blank or setting it to "default".

The network and gateway parameters can also be specified as a DNS or /etc/hosts file resolvable name, or as one of three special keywords:

vpn_gateway -- The remote VPN endpoint address (derived either from --route-gateway or the second parameter to --ifconfig when --dev tun is specified).

net_gateway -- The pre-existing IP default gateway, read from the routing table (not supported on all OSes).

remote_host -- The --remote address if OpenVPN is being run in client mode, and is undefined in server mode.

Tags for OpenVPN ROUTE: failed to parse/resolve route for host/network
Вход в систему
Image CAPTCHA
Enter the characters shown in the image.