EdgeRouter - openVPN restart
-
@stacksofplates said in EdgeRouter - openVPN restart:
It's just a startup script under /etc/init.d. You should be able to just run
/etc/init.d/openvpn restart
Yes, but they make a command for it.
-
@JaredBusch said in EdgeRouter - openVPN restart:
@stacksofplates said in EdgeRouter - openVPN restart:
It's just a startup script under /etc/init.d. You should be able to just run
/etc/init.d/openvpn restart
Yes, but they make a command for it.
Ya on my phone and didn't see your post until after I posted that.
-
@gjacobse said in EdgeRouter - openVPN restart:
@JaredBusch said in EdgeRouter - openVPN restart:
First of all,
restart vpn
is for IPSEC services. Not OpenVPN services.Second, you could not have restarted the router with that command because it does not have that capability.
Command used to restart the router
shutdown -r now
gods the things wrong here..
-
You implied the restart vpn caused a reboot.
-
There is a
reboot
command for that. Use it. why are you applying base OS commands when there is an entire set of commands layered on top to handle all the normal duties. Perhaps doing things you do not know in addition.
-
-
@JaredBusch said in EdgeRouter - openVPN restart:
@gjacobse said in EdgeRouter - openVPN restart:
@JaredBusch said in EdgeRouter - openVPN restart:
First of all,
restart vpn
is for IPSEC services. Not OpenVPN services.Second, you could not have restarted the router with that command because it does not have that capability.
Command used to restart the router
shutdown -r now
gods the things wrong here..
-
You implied the restart vpn caused a reboot.
-
There is a
reboot
command for that. Use it. why are you applying base OS commands when there is an entire set of commands layered on top to handle all the normal duties. Perhaps doing things you do not know in addition.
Restart VPN
andREBOOT
are two wholly different things - I know that.The command to
restart
the SERVICE wasn't found in the time I had to find it for a 14:00 EDTREBOOT
. I wanted to do arestart
of the service rather than areboot
as to not take the site down.As the
restart
command wasn't found in the time I had, theshutdown -r now
was used toreboot
and thusrestart
the OpenVPN services.Upon the
reboot
completion, the service wasrestarted
normally and users were again able to sign in. -
-
@gjacobse you need to step the f*** back and read things a little more carefully. because your little marked up rant there is all kinds of wrong if you are trying to reply to anything I said. -
@gjacobse said in EdgeRouter - openVPN restart:
As the
restart
command wasn't found in the time I had, theshutdown -r now
was used toreboot
and thusrestart
the OpenVPN services.So, the router actually rebooted instead of stopping? Because 'shutdown -r now' is a hard stop, not a reboot. I understand that you were most likely just trying to fix things, but that line especially doesn't make sense.
-
@travisdh1 said in EdgeRouter - openVPN restart:
@gjacobse said in EdgeRouter - openVPN restart:
As the
restart
command wasn't found in the time I had, theshutdown -r now
was used toreboot
and thusrestart
the OpenVPN services.So, the router actually rebooted instead of stopping? Because 'shutdown -r now' is a hard stop, not a reboot. I understand that you were most likely just trying to fix things, but that line especially doesn't make sense.
Restart linux The shutdown command can be used to restart a system with the r option instead of the h option. Usage is same as before. Just replace the h option with r option. # shutdown -r +5 "Server will restart in 5 minutes. Please save your work."
Shutdown linux To shutdown a machine call the shutdown command like this # shutdown -h now The h option is for halt which means to stop. The second parameter is the time parameter. "now" means that shutdown the system right away.
Didn't need to shutdown (halt) the router, I'm not there to restart it. So rather than use -h, the -r was used.
As the service restart wasn't found in the time I had - the router was rebooted as a 'this is what I have now, and the service window is NOW'
I never said that the router rebooted itself. The router was rebooted as the only other option to getting the OpenVPN service to restart......
-
@gjacobse said in EdgeRouter - openVPN restart:
@travisdh1 said in EdgeRouter - openVPN restart:
@gjacobse said in EdgeRouter - openVPN restart:
As the
restart
command wasn't found in the time I had, theshutdown -r now
was used toreboot
and thusrestart
the OpenVPN services.So, the router actually rebooted instead of stopping? Because 'shutdown -r now' is a hard stop, not a reboot. I understand that you were most likely just trying to fix things, but that line especially doesn't make sense.
Restart linux The shutdown command can be used to restart a system with the r option instead of the h option. Usage is same as before. Just replace the h option with r option. # shutdown -r +5 "Server will restart in 5 minutes. Please save your work."
Shutdown linux To shutdown a machine call the shutdown command like this # shutdown -h now The h option is for halt which means to stop. The second parameter is the time parameter. "now" means that shutdown the system right away.
Didn't need to shutdown (halt) the router, I'm not there to restart it. So rather than use -h, the -r was used.
As the service restart wasn't found in the time I had - the router was rebooted as a 'this is what I have now, and the service window is NOW'
I never said that the router rebooted itself. The router was rebooted as the only other option to getting the OpenVPN service to restart......
Ah, I use the shutdown command so infrequently that I'm forgetting what the option switches for it are. That's a lot of typing for
reboot
-
@travisdh1 said in EdgeRouter - openVPN restart:
@gjacobse said in EdgeRouter - openVPN restart:
@travisdh1 said in EdgeRouter - openVPN restart:
@gjacobse said in EdgeRouter - openVPN restart:
As the
restart
command wasn't found in the time I had, theshutdown -r now
was used toreboot
and thusrestart
the OpenVPN services.So, the router actually rebooted instead of stopping? Because 'shutdown -r now' is a hard stop, not a reboot. I understand that you were most likely just trying to fix things, but that line especially doesn't make sense.
Restart linux The shutdown command can be used to restart a system with the r option instead of the h option. Usage is same as before. Just replace the h option with r option. # shutdown -r +5 "Server will restart in 5 minutes. Please save your work."
Shutdown linux To shutdown a machine call the shutdown command like this # shutdown -h now The h option is for halt which means to stop. The second parameter is the time parameter. "now" means that shutdown the system right away.
Didn't need to shutdown (halt) the router, I'm not there to restart it. So rather than use -h, the -r was used.
As the service restart wasn't found in the time I had - the router was rebooted as a 'this is what I have now, and the service window is NOW'
I never said that the router rebooted itself. The router was rebooted as the only other option to getting the OpenVPN service to restart......
Ah, I use the shutdown command so infrequently that I'm forgetting what the option switches for it are. That's a lot of typing for
reboot
Ha - with the limited experience in CLI, I went with what I knew would work.. I used that command in Windows and Linux - so is second nature to type. I'll forgo using the GUI in Win10 and type that ,..... Is it 'right' - meh,.. maybe not. but it works.
-
@gjacobse said in EdgeRouter - openVPN restart:
maybe not. but it works.
How do you know? Have you looked into the
reboot
script to see what it actually does and contrast that with theshutdown -r now
command?It forces a hard restart of the system, but does it actually "work"?
-
Wow, tough crowd on this thread.
-
-
This shit still doesn't work properly through the EdgeOS-provided
/etc/init.d/openvpn
script. If you do/etc/init.d/openvpn status
orsystemctl status openvpn
you get a green-light active (exited) but this is deceiving because it's a one-shot service and not a proper systemd daemon.systemctl edit --full
shows the following piece of crap "service":[Unit] Description=OpenVPN service After=network.target [Service] Type=oneshot RemainAfterExit=yes ExecStart=/bin/true ExecReload=/bin/true WorkingDirectory=/etc/openvpn [Install] WantedBy=multi-user.target
/bin/true
? Are you fucking kidding me, Ubiquiti? I pay thousands of €s for your shit and you still manage to be so bad at Linuxing. At least don't pretend you have a service or properly document your shit, ubnt.https://community.ui.com/questions/Restarting-OpenVPN/2e5c4e8b-ab61-49f1-a25b-e5aa23130d48 suggests that
reset openvpn interface
works but… it didn't. You can try it before you try the following.What helped me was to change settings so the config got regenerated. For example you could
set
ordelete
the following option:interfaces openvpn vtun0 openvpn-option "--cipher AES-256-CBC"
then
commit
and see withsudo ss -lpn | grep :1194
that the thing's started. If OpenVPN is running or doesn't restart, you cankillall openvpn
a few times with forced Enter (hit the Enter key very hard, it's important) before you change the settings.Just wanted to mention this to anyone finding this thread through "openvpn restart edgerouter doesn't work" in google or similar. I hope I sweared enough for my first fucking post in this damn nice forum