Openvpn windows route add command failed

windows route add command failed [adaptive]: returned error code 1

windows route add command failed [adaptive]: returned error code 1

Windows is one of the most used operating systems, but people aren’t a fan of security. This is the prime reason that people use OpenVPN with Windows that helps optimize security standards.

However, while using OpenVPN with Windows, some people struggle with Windows Route Add Command Failed [Adaptive]: Returned Error Code 1, but they don’t know how to resolve the issue. For this purpose, we have the information for fixing this error!

1. Microsoft Issues

Hey, before you step into the troubleshooting methods, there are high chances that Microsoft is imposing security measures. In addition, if you aren’t sure if the error is actually by Microsoft, it’s best that you get in touch with customer support. This is because, in some cases, Microsoft adds new updates that might not be compatible with OpenVPN.

2. Administrator

To begin with, the users need to ensure that you are logging into OpenVPN as the administrator. However, some people are still getting the error if they are already running the administrator. For this purpose, one needs to select the OpenVPNGUI.exe and right-click on the “run as administrator” option and it will help resolve the error.

On top of everything, you should only run OpenVPN as administrators when you are logged in to the system. In addition to this, ensure the OpenVPN is running on the highest privileges to ensure everything works optimally!

3. Access Denied

If you are using Windows 7 or Windows Vista, there are chances of access denied issues on the route.exe command. So, if you are using the Windows variants as we mentioned, you need to run OpenVPN with the elevated privileges.

4. Updates

In some cases, such errors and glitches persist when you aren’t using the latest version of OpenVPN. Especially when you are using OpenVPN on a Windows system, you need to ensure that OpenVPN is running on the latest update. As for now, the latest version is 2.3.11, and we suggest downloading it for streamlined working.

5. TAP-Windows Adapter V9

While using Windows, the users actually have a higher privilege to take things in their hands, which is obviously better for fixing this issue on their own. With this being, open the control panel on your system and tap on networks and the internet. Then, tap on the network and sharing center and scroll down to change settings for the network adapter. This is usually available on the left column.

Then, click on the TAP-Windows Adapter V9, and it will fix the complete configuration with the network. Once the configuration is complete, start the OpenVPN again, and the error will be gone!

6. Local Admin

To be honest, this issue usually happens when you are running OpenVPN as the local administration rather than the member. If this is the case, uninstall OpenVPN from your system as the local admin. Then, log in with the user credentials and download OpenVPN again. When the UAC page opens up, enter your local admin password. As a result, the group will be created, and you need to add the user to this group.

  • Главная
  • Блог
  • Поиск
  • Контакты

Подробный поиск

Android

Apache

Bitrix CMS

Centos

Class

CSS

Debian

Delphi

Docker

Drupal

git

HTML

JavaScript

Joomla

JQuery

JQuery UI

Laravel

Linux

MODx

MTG

openCart

PHP

Python

raspberry pi 3 / arduino

regexp

Script / Tool

Smarty

Soft

SQL

WebAsyst (shop-script)

WordPress

Алгоритмы

Безопасность

Игры

Книги

Настройка / Конфиги

Сторонние сервисы

Управление проектами

Фильмы

08.12.2018

После запуска OpenVpn клиента, на Windows 7 получил сообщение: windows route add command failed adaptive returned error code 1

По идее решением служит запуск клиента OpenVpn от администратора, но мне этот вариант был не удобен. Помогло Полное отключение UAC и перезагрузка системы.


Категории: Настройка / Конфиги, Windows

Настраивая OpenVPN client на Windows 7 столкнулся с проблемой — не прописываются маршруты при подключении:

C:\WINDOWS\system32\route.exe ADD 192.168.1.0 MASK 255.255.255.0 10.10.2.9
ROUTE: route addition failed using CreateIpForwardEntry: ═хтхЁэ√ юфшэ шыш эхёъюы№ъю рЁуєьхэЄют. [status=160 if_index=19]
Route addition via IPAPI failed [adaptive]
Route addition fallback to route.exe
ОК
C:\WINDOWS\system32\route.exe ADD 10.10.2.1 MASK 255.255.255.255 10.10.2.9
ROUTE: route addition failed using CreateIpForwardEntry: ═хтхЁэ√ юфшэ шыш эхёъюы№ъю рЁуєьхэЄют. [status=160 if_index=19]
Route addition via IPAPI failed [adaptive]
Route addition fallback to route.exe
ОК
 Initialization Sequence Completed

Я решил это таким вот путем.
При установке OpenVPN клиента я убрал галочку с установки сервиса т.к. сервис openvpn не стартует с нужными привилегиями (разбираться не стал) для записи маршрутов. При необходимости подключения, нажимаю на ярлык OpenVPNGUI правой кнопкой и запускаю из под администратора.
В конфиг клиента добавить вот это:

route-method  exe

route-delay 2

Если же запуск будет производится без административных привилегий  то будем получать вот такую ошибку:

TEST ROUTES: 2/2 succeeded len=2 ret=1 a=0 u/d=up
C:\WINDOWS\system32\route.exe ADD 192.168.1.0 MASK 255.255.255.0 10.10.2.9
Запрошенная операция требует повышения.
ERROR: Windows route add command failed: returned error code 1
C:\WINDOWS\system32\route.exe ADD 10.10.2.1 MASK 255.255.255.255 10.10.2.9
Запрошенная операция требует повышения.
ERROR: Windows route add command failed: returned error code 1
Initialization Sequence Completed

 Для настройки OpenVPN сервера и клиентов к ним были использованы материалы ресурсов
http://www.lissyara.su/ 
http://www.hackzone.ru/
Прямые ссылки на статьи:
http://www.lissyara.su/doc/man/safety/openvpn/
http://www.lissyara.su/articles/freebsd/security/openvpn/
Калькулятор сетей http://www.hackzone.ru/tools/netcalc/index.php


0

1

Всем доброго времени суток!

есть офис с сеткой и серваками 10.11.201.0 /24
Там же сидит офисный планктон и юзает файловый сервер 10.11.201.2
Люди хотят из дома иметь к нему доступ

Что сделано
поднята ubuntu 20.04 serv 10.11.201.234 и на ней OpenVPN, все пробросы через роутер сделаны и собственно SSH и Сам Open VPN подымается соединяется но вот беда в сетку ходу нет

Ранее я проворачивал такой трюк, но там сам сервер стоял в место роутера ( физически два интерфейса, один в инет другой в локалку), тут же интерфейс один и седит он за роутером в той же сети где и все

А сейчас у меня ни клиент клиента не видит, ни кого из внутренней сетки… в толк взять не могу где туплю…

Конфиг сервера :

port 3888
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key  
dh none
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /var/log/openvpn/ipp.txt
server-bridge 10.11.201.234 255.255.255.0 10.11.201.200 10.11.201.233
push "route 10.11.201.0 255.255.255.0"
client-to-client
keepalive 10 120
tls-crypt ta.key
cipher AES-256-GCM
auth SHA256
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log
verb 3
explicit-exit-notify 1

конфиг клиента:

client
dev tun
remote xx.xxx.xx.xx 3888
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-GCM
auth SHA256
key-direction 1
verb 3
<ca>
</ca>
<cert>
</cert>
<key>
</key>
<tls-crypt>
</tls-crypt>

естественно сертификаты удалил…

а еще в логах клиента меня взволновал вот такой момент :

2022-09-06 09:30:05 TUN: Setting IPv4 mtu failed:   .   [status=5 if_index=8]
2022-09-06 09:30:10 TEST ROUTES: 1/1 succeeded len=1 ret=1 a=0 u/d=up
2022-09-06 09:30:10 C:\WINDOWS\system32\route.exe ADD 10.8.0.1 MASK 255.255.255.255 10.8.0.5
2022-09-06 09:30:10 ROUTE: route addition failed using CreateIpForwardEntry:   .   [status=5 if_index=8]
2022-09-06 09:30:10 Route addition via IPAPI failed [adaptive]
2022-09-06 09:30:10 Route addition fallback to route.exe
2022-09-06 09:30:10 env_block: add PATH=C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
2022-09-06 09:30:10 ERROR: Windows route add command failed [adaptive]: returned error code 1
2022-09-06 09:30:10 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2022-09-06 09:30:10 Initialization Sequence Completed

В связи с чем у меня вопрос, где я напортачил ?

Перемещено hobbit из general

In case you get the following error when you connect to OpenVPN server from a Windows machine using OpenVPN-GUI, that means an error with your client side settings.

openvpn

To solve this issue, try the following solutions,

1. Make sure OpenVPN-GUI runs with administrator privileges.

Close OpenVPN GUI from the system tray (bottom right hand side) >> Right click on OpenVPN GUI icon on the desktop >> Select “Run as Administrator”

2. Put the following directives to your OVPN file and run OpenVPN-GUI as administrator

route-method exe
route-delay 2

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Windows vista iso english
  • Управление подписями в windows
  • Как экстренно закрыть приложение на windows
  • Windows 10 домашняя загрузка
  • Seagate media sync для windows