Hellow.
recently installed my first openvpn server.
I need to do that all clients have the same default gateway through the VPN. To facilitate / unify the routing on clients
This is the configuration of my server
port 1194
proto udp
dev tun
#---- Seccion de llaves -----
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
#--------- Seccion para autenticar usuario --------------#
plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login
username-as-common-name
#----------------------------
server 172.16.0.0 255.255.255.0
push "redirect-gateway"
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status-servidorvpn-udp-1194.log
verb 3
This is the configuration of my client's
client
dev tun
proto udp
remote 10.1.1.186 1194
float
resolv-retry infinite
nobind
persist-key
persist-tun
#------ SECCION DE LLAVES --------
ca ca.crt
cert cliente1.crt
key cliente1.key
ns-cert-type server
#---------------------------------
# sin este parametro el usuario y passw se piden al final.
auth-user-pass
comp-lzo
verb 3
and so is the state of the network after vpn connect with client1
Adaptador Ethernet Conexión de área local 5 :
Sufijo de conexión específica DNS :
Descripción. . . . . . . . . . . : TAP-Win32 Adapter V9
Dirección física. . . . . . . . . : 00-FF-B5-06-F7-0A
DHCP habilitado. . . . . . . . . : No
Autoconfiguración habilitada. . . : Sí
Dirección IP. . . . . . . . . . . : 172.16.0.10
Máscara de subred . . . . . . . . : 255.255.255.252
----->Puerta de enlace predeterminada : 172.16.0.9 <----------------------------
Servidor DHCP . . . . . . . . . . : 172.16.0.9
..and so is the state of the network after vpn connect with client2
Adaptador Ethernet Conexion de Area local 3 :
Sufijo de conexion especifica DNS :
Descripcion. . . . . . . . . . . : TAP-Win32 Adapter V9
Direccion fisica. . . . . . . . . : 00-FF-7C-25-59-5D
DHCP habilitado. . . . . . . . . : No
Autoconfiguracion habilitada. . . : Si
Direccion IP. . . . . . . . . . . : 172.16.0.6
Mascara de subred . . . . . . . . : 255.255.255.252
----->Puerta de enlace predeterminada : 172.16.0.5 <----------------------------
Servidor DHCP . . . . . . . . . . : 172.16.0.5
As you can see the default gateway for each client is different.
What should I do for all guests to the same default gateway?
thank.