OpenVPN: redirect-gateway not working on windows? (Sending all trafic through VPN)
Whao, it cost me several hours to find out why I wasn't able to route all my internet traffic through an OpenVPN connection on my Windows 10 device. Now I'd like to share my solution with you:
Problem:
OpenVPN connection is working successfully and I'm able to connect to my local network. Everything works fine so far, BUT: Now I wanted to tunnel all my (internet) traffic through my VPN when I'm surfing in an open network.
I was trying to use the guidelines here but my IP stayed the same: http://mxtoolbox.com/WhatIsMyIP/ - so the internet traffic was not going through the tunnel but directly through the network interface.
Context:
- Windows 10 device
- OpenVPN Server and OpenVPN GUI Client (no further information for security reasons)
Solution:
- After reading a bit through several discussions and tutorials I was able to find out two very simple reasons:
- Set the OpenVPN GUI to start as administrator to ensure that it is able to set everything correctly
- IMPORTANT: Set the dev-node name in the client.ovpn configuration correctly!!
In my example there was more than one TAP device (due to other VPNs) and the OpenVPN network adapter name was not set correctly! The situation was as described above. Traffic was not tunneled while everything else worked fine!
So my simple solution was to rename the network adapter in the windows network configuration to "OpenVPN" and set the dev-node setting in the client.ovpn.
Then simply restart OpenVPN GUI and ensure that the right configuration was loaded (right click on the GUI symbol > "change configuration")
# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one. On XP SP2,
# you may need to disable the firewall
# for the TAP adapter.
dev-node OpenVPN
(Important: Ensure to set the correct name of your TAP Adapter here or rename it to OpenVPN like I did!!)
That's it!
Now all traffic is tunneled through OpenVPN even in Windows 7 / 8 / 10 ;) ;)
Please leave a comment if this was helpful for you!
Julian Pustkuchen, M. Sc. Wirtschaftsinformatik ist passionierter Software- & Webentwickler mit den Schwerpunkten Softwaredesign, Objektorientierung sowie Usability- & Ablaufoptimierung bei webks. Ein weiterer Schwerpunkt ist die Entwicklung im CMS Drupal.
Entwickelt Julian gerade keine Software, fährt er Ski, Mountainbike, spielt Badminton, segelt oder verbringt Zeit mit Freunden.
Dieser Blog dient als sein "öffentlicher Notizblo(ck/g)".
Euch gefällt mein Blog?
Vielleicht hilft mir auch ein Buch, euch zukünftig (noch) bessere Artikel zu bieten? (Amazon Wunschliste)
Gerne bewerte ich auch ab und zu einmal unabhängig ein Produkt.
Ich freue mich über jede Art der Unterstützung in Form von Kommentaren, Lob oder Kritik.
Auf zum Kontaktformular!
Zu meinem Google+ Profil
Webbasierte Lösungen? Machen wir!
webks: websolutions kept simple
http://www.webks.de
Tags in Blogeintrag - Kategorie
Dir hat dieser Beitrag viel Zeit und Nerven gespart?
Dann freue ich mich über jede kleine Anerkennung:
Oder du suchst weitere professionelle Unterstützung?
Dann bietet dir unser webks.de Softwareentwickler-Team professionelle Dienstleistungen im Web-Development und der Drupal CMS Entwicklung!
Kommentare
It works for me
Dear Julian,
Thanks for share this tip. It works on Windows 8.1 Spanish Edition 64-bit + OpenVPN 2.4.9
Kommentar hinzufügen