3 days without disconnects.
I bought UPS
But "tunnels" error is still here.
Sometimes it autoreconnect in 2 minutes.
I got an advice within Beeline forum: "lcp-echo-adaptive" in additional pppd parameters.
RMerlin, how do you think, can it be good for me?
No idea. But I spent two full evening working on tracking down the Beeline issue where it was failing to connect at boot time, having obtained further info from another user. The issue was caused by the new web redirection implementation that I did in 354 Beta to resolve the issue where LAN hostnames weren't resolved if WAN was down.
What web redirection does is, either at boot time or after WAN goes down, all DNS queries or attempts to access a website are intercepted, and redirected to the router's internal server. This is what allows you to plug a new router, type "www.whatever.com", and end up on the configuration wizard - no need to know the router's IP.
The problem is with Beeline, you really have two stages in WAN connection: first the DHCP lease, then the VPN tunnel. Expected behaviour (before 3.0.0.4.354 beta) would be:
1) Router is booted. All DNS queries redirected to 10.0.0.1, which is intercepted by ebtables, and redirects to the router's webui.
2) WAN gets a DHCP lease from Beeline. You get an IP, and two internal DNS servers from Beeline.
3) The VPN client resolves Beeline's VPN server hostname using the internal DNS, connects the tunnel, and obtains new, public DNS.
The first bug in 354 beta was dnsmasq wasn't properly started at boot time because the router was trying to start it too early, preventing hostname resolution of the VPN hostname.
A second issue was, when the tunnel went down, the router would immediately re-enable web redirection, preventing the VPN client from resolving the VPN hostname. I am not sure if this was also a regression caused by my re-implementation of web redirect or something that was also broken in the original FW. Normally, web redirection should only get enabled if the actual WAN interface (either the Ethernet connection or the primary DHCP link) went down.
I had to recreate a lab environment similar to Beeline in my living room: main router providing a DHCP lease to my test router, and a PPTP server running in a virtual machine for the second stage of the connection. This allows my test router to work just like yours would on Beeline: get a DHCP lease, resolve the testvpn.mylan.lan hostname, and connect to its PPTP VPN.
Now that I was able to simulate a Beeline environment, I was able to track down and fix the first issue, which took a lot of time and experiments.
The second issue, which is web redirection being re-enabled when tunnel went down has taken me a lot of time as well. It was only last night at about 4 am that I had a sane, working solution: from now on, web redirection will still be active at boot time, but if you use either l2tp or pptp, it will NOT be re-enabled if the WAN goes down.
I still need to do a lot of tests here (this is what is causing Beta 2 to be delayed). There are various scenarios I haven't tested yet, such as name resolution after the tunnel goes down but dhcp lease remains valid.
So, at this point in my current development code:
1) The connect to Beeline at boot time is fixed
2) The reconnect if tunnel went down might be fixed, it needs further testing
In the mean time, Beeline users might want to revert back to 270.26b until the next beta release comes out.
PS: I still hate Beeline's weird architecture. I haven't heard of any other ISP in the world using a similar design.