What's new

OpenVpn dont start after reconnect

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

svenp

Occasional Visitor
Hi Merlin, my OpenVpn is not startup after Router reconnect.
I see in the logfile 2 scripts at the same time openvpn shutdown und startup.
I think the startup after reconnect is to quick?


My log:
Oct 13 07:33:03 pppd[559]: LCP terminated by peer
Oct 13 07:33:03 pppd[559]: Connect time 1440.1 minutes.
Oct 13 07:33:03 pppd[559]: Sent 45479565 bytes, received 817642663 bytes.
Oct 13 07:33:03 dnsmasq[581]: read /etc/hosts - 3 addresses
Oct 13 07:33:03 dnsmasq-dhcp[581]: read /etc/ethers - 4 addresses
Oct 13 07:33:03 dnsmasq[581]: using nameserver x.x.x.143#53
Oct 13 07:33:03 dnsmasq[581]: using nameserver x.x.x.142#53
Oct 13 07:33:04 WAN Connection: Fail to connect with some issues.
Oct 13 07:33:04 notify_rc : stop_nat_rules
Oct 13 07:33:04 stop_nat_rules: apply the redirect_rules!
Oct 13 07:33:05 openvpn[1230]: write UDPv4 []: Network is unreachable (code=128)
Oct 13 07:33:06 pppd[559]: Connection terminated.
Oct 13 07:33:06 pppd[559]: Sent PADT
Oct 13 07:33:06 pppd[559]: Modem hangup
Oct 13 07:33:15 openvpn[1230]: write UDPv4 []: Network is unreachable (code=128)
Oct 13 07:33:16 pppd[559]: PPP session is 1411 (0x583)
Oct 13 07:33:16 pppd[559]: Connected to 00:xx:xx:xx:xx:xx via interface eth0
Oct 13 07:33:16 pppd[559]: Using interface ppp0
Oct 13 07:33:16 pppd[559]: Connect: ppp0 <--> eth0
Oct 13 07:33:17 pppd[559]: CHAP authentication succeeded
Oct 13 07:33:17 pppd[559]: CHAP authentication succeeded
Oct 13 07:33:17 pppd[559]: peer from calling number 00:xx:xx:xx:xx:xx authorized
Oct 13 07:33:17 pppd[559]: local IP address x.x.x.x
Oct 13 07:33:17 pppd[559]: remote IP address x.x.x.x
Oct 13 07:33:17 pppd[559]: primary DNS address x.x.x.x
Oct 13 07:33:17 pppd[559]: secondary DNS address x.x.x.x
Oct 13 07:33:17 dnsmasq[581]: read /etc/hosts - 3 addresses
Oct 13 07:33:17 dnsmasq-dhcp[581]: read /etc/ethers - 4 addresses
Oct 13 07:33:17 dnsmasq[581]: using nameserver x.x.x.x#53
Oct 13 07:33:17 dnsmasq[581]: using nameserver x.x.x.x#53
Oct 13 07:33:17 notify_rc : start_nat_rules
Oct 13 07:33:17 start_nat_rules: apply the nat_rules!
Oct 13 07:33:18 notify_rc : stop_upnp
Oct 13 07:33:18 miniupnpd[1236]: received signal 15, good-bye
Oct 13 07:33:18 notify_rc : start_upnp
Oct 13 07:33:18 syslog: SNet version started
Oct 13 07:33:18 miniupnpd[4708]: HTTP listening on port 42327
Oct 13 07:33:18 miniupnpd[4708]: Listening for NAT-PMP traffic on port 5351
Oct 13 07:33:19 WAN Connection: WAN was restored.
Oct 13 07:33:19 notify_rc : start_nat_rules
Oct 13 07:33:19 notify_rc : start_apps_update
Oct 13 07:33:19 rc_service: start_apps_update is waitting start_nat_rules...
Oct 13 07:33:28 ddns update: connected to members.dyndns.org (204.13.248.111) on port 80.
Oct 13 07:33:28 ddns update: error recv()ing reply: Connection reset by peer
Oct 13 07:33:28 ddns update: server output:
Oct 13 07:33:28 ddns update: strange server response, are you connecting to the right server?

***Oct 13 07:33:28 notify_rc : stop_vpnclient1
***Oct 13 07:33:28 notify_rc : start_vpnclient1
***Oct 13 07:33:28 rc_service: start_vpnclient1 is waitting stop_vpnclient1...
***Oct 13 07:33:44 rc_service: skip the event: start_vpnclient1.

Oct 13 07:33:53 openvpn[1230]: TLS: tls_process: killed expiring key
Oct 13 07:33:54 openvpn[1230]: TLS: soft reset sec=0 bytes=36855/0 pkts=702/0
Oct 13 07:33:58 openvpn[1230]: event_wait : Interrupted system call (code=4)
Oct 13 07:33:58 openvpn[1230]: TCP/UDP: Closing socket
Oct 13 07:33:58 openvpn[1230]: /sbin/route del -net 10.14.0.0 netmask 255.255.0.0
Oct 13 07:33:58 openvpn[1230]: /sbin/route del -net 10.12.0.0 netmask 255.255.0.0
Oct 13 07:33:58 openvpn[1230]: /sbin/route del -net 10.11.0.0 netmask 255.255.0.0
Oct 13 07:33:58 openvpn[1230]: /sbin/route del -net 10.10.0.0 netmask 255.255.0.0
Oct 13 07:33:58 openvpn[1230]: /sbin/route del -net 10.1.1.0 netmask 255.255.255.0
Oct 13 07:33:58 openvpn[1230]: Closing TUN/TAP interface
Oct 13 07:33:58 openvpn[1230]: /sbin/ifconfig tun11 0.0.0.0
Oct 13 07:33:58 openvpn[1230]: updown.sh tun11 1500 1542 10.1.1.6 10.1.1.5 init
Oct 13 07:33:58 openvpn[1230]: SIGTERM[hard,] received, process exiting
 
It's possible, I will have to study that part of the code to see if anything can be done - it will certainly be tricky to fix.
 
Can't reproduce the issue here. If I pull the WAN cable and put it back, the router properly shuts down the VPN client, and re-establishes it afterward.
 
Hi Merlin, it´s verry funny.

This Problem comes only after the first reconnect after cold start from the router.

Last week I left the router on. Only the first reconnect, the openvpn don´t comes up.
Then I turned off the router and after 1. reconnect terminated the script again.

What can it be?
 
Not a clue, I can't reproduce the issue here. Might be a timing issue.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top