Openvpn does not restart netgear r6700v3

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Goto page Previous  1, 2
Author Message
andrea_m83
DD-WRT User


Joined: 16 Jun 2020
Posts: 50

PostPosted: Tue Feb 23, 2021 16:34    Post subject: Reply with quote
eibgrad wrote:
Because you've edited the syslog, it's hard for me to be sure exactly what's happening. For example, I can't tell if the public IP to which you are connecting is the same or different each time the client attempts a connection. I understand the necessity if this is your own OpenVPN server, but not for a public one (ExpressVPN, PIA, etc.). The reason I care is because I'm trying to determine *why* it keeps trying to reconnect, then suddenly gets connected (makes sense if the client is trying different public IPs, but not if they are the same), but ultimately fails due to the route-down script failing.

At the following point in the syslog, it *finally* appears to be connecting after many failed attempts.

Code:
Sat Feb 20 13:17:51 2021 us=388418 [XXXXXX] Peer Connection Initiated with [AF_INET]141.XXX.YYY.ZZZ:443
rSat Feb 20 13:17:52 2021 us=929800 SENT CONTROL [XXXXX]: 'PUSH_REQUEST' (status=1)
WRRSat Feb 20 13:17:52 2021 us=964542 PUSH: Received control message: 'PUSH_REPLY,comp-lzo no,redirect-gateway  def1 bypass-dhcp,dhcp-option DNS 10.X.Y.Z.,route-gateway 10.X.Y.Z,topology subnet,ping 10,ping-restart 60,ifconfig 10.X.Y.Z 255.25
.255.0,peer-id 3,cipher AES-256-GCM'


I can assure you that the public ip is identical every time it connects, it's AirVPN server.
Now upgraded to last build available (r45820), I will check...
But, it seems a strange question, can you explain me why if I restart the DSL connection of my will, the openvpn client then restarts automatically, while if there are disconnections due to the ISP provider openvpn remains off?

egc wrote:
If the OpenVPN does not restart with the script then reboot the router, in this line of the script:
Code:
#REBOOT=
remove the # so that it will read:
Code:
REBOOT=


Is demarked, thanks
Sponsor
andrea_m83
DD-WRT User


Joined: 16 Jun 2020
Posts: 50

PostPosted: Mon Jul 05, 2021 22:27    Post subject: Gateway VPN Reply with quote
I resume this discussion, I have several devices connected that have as a gateway the router with openvpn. If the isp connection goes ko as already said, now it reconnects automatically, unfortunately, however, the hosts do not do the same thing, i.e. I need a restart of the openvpn service.

[EDIT] it looks that you do not need to restart the openvpn client, but just give an "apply changes" even if no changes have been made anywhere, and client below the router reconnects to Internet
andrea_m83
DD-WRT User


Joined: 16 Jun 2020
Posts: 50

PostPosted: Sat Jan 15, 2022 1:47    Post subject: Re: Gateway VPN Reply with quote
andrea_m83 wrote:
I resume this discussion, I have several devices connected that have as a gateway the router with openvpn. If the isp connection goes ko as already said, now it reconnects automatically, unfortunately, however, the hosts do not do the same thing, i.e. I need a restart of the openvpn service.

[EDIT] it looks that you do not need to restart the openvpn client, but just give an "apply changes" even if no changes have been made anywhere, and client below the router reconnects to Internet



Does anyone have any idea how to solve the problem? ... in the morning when I wake up I find the server unreachable due to the numerous faults of the ISP provider.
The DD-WRT v3.0-r47942 std is my last version changed.
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 9157

PostPosted: Sat Jan 15, 2022 2:12    Post subject: Re: Gateway VPN Reply with quote
andrea_m83 wrote:
andrea_m83 wrote:
I resume this discussion, I have several devices connected that have as a gateway the router with openvpn. If the isp connection goes ko as already said, now it reconnects automatically, unfortunately, however, the hosts do not do the same thing, i.e. I need a restart of the openvpn service.

[EDIT] it looks that you do not need to restart the openvpn client, but just give an "apply changes" even if no changes have been made anywhere, and client below the router reconnects to Internet



Does anyone have any idea how to solve the problem? ... in the morning when I wake up I find the server unreachable due to the numerous faults of the ISP provider.
The DD-WRT v3.0-r47942 std is my last version changed.


ddwrt-ovpn-watchdog.sh

??

_________________
ddwrt-ovpn-split-basic.sh (UPDATED!) * ddwrt-ovpn-split-advanced.sh (UPDATED!) * ddwrt-ovpn-client-killswitch.sh * ddwrt-ovpn-client-watchdog.sh * ddwrt-ovpn-remote-access.sh * ddwrt-ovpn-client-backup.sh * ddwrt-mount-usb-drives.sh * ddwrt-blacklist-domains.sh * ddwrt-wol-port-forward.sh * ddwrt-dns-monitor.sh (NEW!)
andrea_m83
DD-WRT User


Joined: 16 Jun 2020
Posts: 50

PostPosted: Sun Jan 16, 2022 0:54    Post subject: Reply with quote
I was running this script so far:

ddwrt-vpn-pbr-watchdog-05.sh.

I hope with this to resolve then. I suppose is the same procedure, I put it into my mounted usb pendrive and make it executable
andrea_m83
DD-WRT User


Joined: 16 Jun 2020
Posts: 50

PostPosted: Wed Jan 19, 2022 8:27    Post subject: Same issues Reply with quote
Hi guys, same result ... the client restarts it would seem, because from Administration/Openvpn it is "Connected Success", however the hosts, all connected behind the dd-wrt router in vpn, lose the connection. But just press a random "Apply Settings" somewhere in the GUI that fixes everything ... Very strange... If the same hosts are connected to another device with the openvpn client on board (for example a Raspberry) this it doesn't happen. Confused
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Wed Jan 19, 2022 9:30    Post subject: Reply with quote
Upgrade to the latest build 48138 first.

The script can also reboot the router when a connection is lost instead of restarting the tunnel

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
jjwatmyself
DD-WRT User


Joined: 19 Mar 2016
Posts: 55

PostPosted: Thu Jan 20, 2022 18:07    Post subject: Reply with quote
I created and posted an elaborate VPN and Internet reachability script. It should solve most of what is going on here I think.

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1256142#1256142

_________________
--------------------------------------------------
VLANs, port trunking, virtual SSID (Guest)
DNSmasq, NTP, syslog, nflow
Hub and spoke, multi-site, routed VPN (OpenVPN client), split tunnel
1 DNS zone per site, forward, reverse look-up across all sites

Asus RT-AC68U rev A2 DD-WRT v3.0-r48138 std (01/17/22)
Asus RT-AC68U rev C1 DD-WRT v3.0-r48138 std (01/17/22)
Asus RT-AC1900P DD-WRT v3.0-r48138 std (01/17/22)
Asus RT-AC1900P DD-WRT v3.0-r48138 std (01/17/22)
Netgear R7000 DD-WRT v3.0-r48138 std (01/17/22)
Linksys E2000 DD-WRT v3.0-r33492 mega (10/10/17)
andrea_m83
DD-WRT User


Joined: 16 Jun 2020
Posts: 50

PostPosted: Mon Jan 24, 2022 23:46    Post subject: Final act! Reply with quote
I don't want to be too hasty, but it looks like we finally fixed it! I installed ddwrt-ovpn-watchdog.sh as recommended by eibgrad and updated the firmware to r48138 thanks to egc.
this morning new wan disconnection, but the clients reconnected to the internet behind openvpn automatically.

Attached the log
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum