OpenVPN not start automatically after reboot

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
myogyisg
DD-WRT Novice


Joined: 11 Sep 2017
Posts: 26

PostPosted: Sun Nov 12, 2017 7:02    Post subject: OpenVPN not start automatically after reboot Reply with quote
Hi All,

I installed OpenVPN and can connect well from iphone.
But, after reboot the router, the service not listen on UDP/1194.

Only thing to work is go to "Administration", "Command", and Click "Safe Firewall script".

After that, it start successfully.

Is there any way to add the openvpn to start automatically after reboot?

Or, any script to add at "Startup Script"?
Sponsor
jxm
DD-WRT Guru


Joined: 23 Jul 2017
Posts: 733
Location: Brisbane, Australia

PostPosted: Sun Nov 12, 2017 8:55    Post subject: Re: OpenVPN not start automatically after reboot Reply with quote
myogyisg wrote:
Hi All,

I installed OpenVPN and can connect well from iphone.
But, after reboot the router, the service not listen on UDP/1194.

Only thing to work is go to "Administration", "Command", and Click "Safe Firewall script".

After that, it start successfully.

Is there any way to add the openvpn to start automatically after reboot?

Or, any script to add at "Startup Script"?


What does the OpenVPN log say?

You could try using the “WAN Up” option rather than “System”. Some of the instructions say that Wan Up does not work, but it works well.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 5175
Location: Netherlands

PostPosted: Sun Nov 12, 2017 11:26    Post subject: Reply with quote
What router, what firmware ?
_________________
Routers:Netgear R7800, Netgear R6400v1, Netgear R6400v2, Linksys EA6900 (XvortexCFE), Linksys E2000 (converted WRT320N), WRT54GS v1.
Install guide Linksys EA6900: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=291230
OpenVPN Policy Based Routing guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
myogyisg
DD-WRT Novice


Joined: 11 Sep 2017
Posts: 26

PostPosted: Sun Nov 12, 2017 14:45    Post subject: Reply with quote
Hi,

Below are the logs.

openvpn : OpenVPN daemon (Server) starting/restarting...
openvpn[2186]: OpenVPN 2.4.4 arm-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Oct 23 2017
openvpn[2186]: library versions: OpenSSL 1.1.0f 25 May 2017, LZO 2.09
openvpn[2188]: NOTE: starting with OpenVPN 2.1, '--script-security 2' or higher is required to call user-defined scripts or executables
openvpn[2188]: TUN/TAP device tun0 opened
openvpn[2188]: do_ifconfig, tt->did_ifconfig_ipv6_setup=0
openvpn[2188]: /sbin/ifconfig tun0 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
openvpn[2188]: WARNING: External program may not be called unless '--script-security 2' or higher is enabled. See --help text or man page for detailed info.
openvpn[2188]: WARNING: Failed running command (--route-up): external program fork failed
openvpn[2188]: Could not determine IPv4/IPv6 protocol. Using AF_INET6
openvpn[2188]: UDP: Cannot create UDP/UDP6 socket: Address family not supported by protocol (errno=97)
openvpn[2188]: Exiting due to fatal error
openvpn[2188]: /tmp/openvpn/route-down.sh tun0 1500 1621 10.8.0.1 10.8.0.2 init
openvpn[2188]: WARNING: Failed running command (--up/--down): external program fork failed
openvpn[2188]: Exiting due to fatal error

I noticed that there is one error related with IPV6 protocol. After Google, I found that there is some relation with disabling of IPV6.
So, what I simply enabled IPv6, rebooted the router and all works.
Not sure whether IPv6 is the really requirement for OpenVPN to start successfully?
myogyisg
DD-WRT Novice


Joined: 11 Sep 2017
Posts: 26

PostPosted: Sun Nov 12, 2017 14:47    Post subject: Reply with quote
Firmware: DD-WRT v3.0-r33586a
Router: DLINK DIR 868L

egc wrote:
What router, what firmware ?
jaskerx
DD-WRT Novice


Joined: 24 Aug 2016
Posts: 31

PostPosted: Wed Nov 15, 2017 12:32    Post subject: Reply with quote
Been dealing with this problem forever. Do you have an ebtables process eating 49.9% of your cpu when you reboot? try killall openvpn then stopservice openvpn then startservice openvpn. Open top and see if ebtables is wasting cpu if so kill the pid. I blame this:

https://www.dd-wrt.com/phpBB2/viewtopic.php?t=308120&postdays=0&postorder=asc&start=0

EDIT: Or you may need proto udp4 in additional config.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware 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 can attach files in this forum
You can download files in this forum