Help with OpenVPN. Route all traffic through the VPN

Anónimas
2024-02-20T10:13:09+00:00

I have an OpenVPN Server on a Mikrotik router. I have created the .ovpn file and when I connect from a Windows Client, the connection is successful, but it does not route all traffic through the VPN. This is why I cannot access the IPs of my internal network, nor do I access the internet from the public IP of the Server. I have also tried with the OpenVPN client for Android and get the same result.

Searching online, I found that if I add the line "redirect-gateway def1" in the ovpn configuration file on the client, it should route all traffic through the VPN.

In the case of Android, it works, and I can now access the IPs of the internal network, as well as accessing the internet through the public IP of the Server.

But in the case of Windows Clients, it doesn't work. I have tried on different PCs, and with different versions of Windows.

When I look at the IP route tables, I see that the VPN client does not add its route with higher priority, maintaining the route with the gateway of my internet adapter as more prioritized.

All traffic should be routed through the VPN IP (10.70.0.1).

Could someone please help me? Thank you very much!

IP route table before connecting to the VPN:

IP route table after connecting to the VPN:

***movd from Windows / Windows 11 / Internet y conectividad***

Windows para empresas | Cliente de Windows para profesionales de TI | Redes | Redes definidas por software

Pregunta bloqueada. Esta pregunta se migró desde la Comunidad de Soporte técnico de Microsoft. Puede votar si es útil, pero no puede agregar comentarios o respuestas ni seguir la pregunta. Para proteger la privacidad, los perfiles de usuario de las preguntas migradas son anónimos.

0 comentarios No hay comentarios
{count} votos

1 respuesta

Ordenar por: Muy útil
  1. Anónimas
    2024-02-22T09:07:37+00:00

    Esta respuesta se ha traducido automáticamente. Como resultado, puede haber errores gramaticales o expresiones extrañas.

    Hola

    Agregue la línea "redirect-gateway def1" al archivo de configuración ovpn del cliente. Esto agregará una ruta estática al servicio VPN que está utilizando, eliminará la ruta predeterminada actual y agregará una ruta predeterminada que apunte al túnel VPN. Sin embargo, tenga en cuenta que esto puede tener consecuencias no deseadas, como no poder acceder a los recursos de su red corporativa o al servidor DNS de su ISP mientras la conexión VPN está activa. El primero se puede resolver agregando rutas estáticas adicionales a la red corporativa y el segundo mediante el uso de un servidor DNS público.

    Saludos

    Zunhui

    1 persona ha encontrado útil esta respuesta.
    0 comentarios No hay comentarios