Hello,
I have openvpn server 2.3.10 on ubuntu 16.04 LTS machine which is working fine.
I have openvpn connect 3.1.0 on android box, android 9 (pie)
My profiles work on my android phone, windows 10 PC and even on my DSL modem.
The same profiles also work on my android box *if* I'm connected to the internet via WIFI. If I disconnect the WIFI and connect to the internet via LAN cable it disconnects immediately after connecting.
-- Event: CONNECTED INFO=*VPN IP ADDRESS* via TCPv4 on tun...
-- TCP recv error: Software caused connection abort.
-- Transport Error: Transport error on *VPN IP ADDRESS*: NETWORK_RECV_ERROR
It seems to me that when connected via LAN, OpenVPN can't route the LAN properly. Any idea why it's working fine with WIFI but fails on LAN on the same machine?
Problem connecting via LAN
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Problem connecting via LAN
Because, when you are on the same LAN and redirecting your default gateway you burn the midnight oil.
See --redirect-gateway option autolocal in the manual.
See --redirect-gateway option autolocal in the manual.
-
- OpenVpn Newbie
- Posts: 2
- Joined: Fri Jan 17, 2020 8:09 pm
Re: Problem connecting via LAN
I did look it up and also some threads on serverfault website. Still I'm not getting anywhere.
In my server config, I had these lines (was taken from an online tutorial)
Added autolocal to the first line:
Nothing changed after that. I did restart the server and now the client log is showing [autolocal] in the --OPTIONS part:
I have Windows 10 on the same network and also connected via LAN cable to the same router. Same configuration file. Windows is handling it well but Android box fails.
In my server config, I had these lines (was taken from an online tutorial)
Code: Select all
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
Code: Select all
push "redirect-gateway autolocal def1 bypass-dhcp"
Nothing changed after that. I did restart the server and now the client log is showing [autolocal] in the --OPTIONS part:
Code: Select all
0 [redirect-gateway] [autolocal] [def1] [bypass-dhcp]
1 [dhcp-option] [DNS] [208.67.222.222]
2 [dhcp-option] [DNS] [208.67.220.220]
3 [route] [10.8.0.1]
4 [topology] [net30]
5 [ping 10]
6 [ping-restart] [120]
7 [ifconfig] [10.8.0.46] [10.8.0.45]