View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 19 posts ] 
Go to page Previous  1, 2

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Thu Sep 06, 2018 7:19 am 
Offline
Joined: Tue Mar 27, 2018 12:02 pm
Posts: 28
Thank you very much. That worked.

#sudo modprobe tun

#sudo ls -l /dev/net/tun
crw-rw-rw- 1 root root 10, 200 Sep 6 07:51 /dev/net/tun

#sudo openvpn --config myvpn.ovpn

I run the command manually....
sudo openvpn --config myvpn.ovpn

This ran and i got vpn IP address
However, i am not getting my command line back.

.......
Thu Sep 6 09:12:51 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
....
....
Thu Sep 6 09:12:53 2018 /usr/bin/ip route add 10.x.y.0/32 via 10.x.y.25
Thu Sep 6 09:12:53 2018 Initialization Sequence Completed

(Here the cursor just waits forever)
If i hit Ctrl-D, it kills the VPN conection

Question 1> When running this command manually, how do i get my command line back

Question 2> I tried to run this during boot up but i am not being successful as per the article below.
(https://wiki.archlinux.org/index.php/OpenVPN)

# sudo systemctl start openvpn-client@myvpn.service
(myvpn is the config file located at /etc/openvpn/client/myvpn.ovpn)

Failed to get D-Bus connection: Operation not permitted

Any thoughts?

Many thanks!
jim


Top
 Profile  
 
PostPosted: Thu Sep 06, 2018 9:06 pm 
Offline
Joined: Thu Sep 27, 2007 5:44 pm
Posts: 480
caymann,

I think I have an easy answer to your first question. Just append "&" to the end of the command and it will launch in the background, leaving your shell script available:

"sudo openvpn --config myvpn.ovpn &"

I don't have a good answer on the auto launching. Hopefully someone else can help you with that. I've also just noticed that brfransen has pushed the updates from testing to the production repos. If you update, you will likely need to go back to the first openvpn package that I linked because the dependency packages will have changed.


Top
 Profile  
 
PostPosted: Fri Sep 07, 2018 2:39 pm 
Offline
Joined: Tue Mar 27, 2018 12:02 pm
Posts: 28
Thanks for that.
I figured out how to use runit
So i am using runit and works fine during bootup
It is running as a service now

I created:
#sudo nano /etc/sv/openvpn/run

And added the following contents

!/bin/sh
echo "Starting ExpressVPN"
exec 2>&1
sudo modprobe tun
sudo /usr/bin/openvpn --config /etc/openvpn/client/vpn.conf


I made it executible
#chmod +x run

#sudo add_service.sh openvpn
#sudo sv stop openvpn
#sudo sv start openvpn
# sudo sv status openvpn
run: openvpn: (pid 863) 20257s
reboot


Top
 Profile  
 
PostPosted: Fri Sep 07, 2018 7:31 pm 
Offline
Joined: Thu Sep 27, 2007 5:44 pm
Posts: 480
That's terrific. Sorry I wasn't able to get the compiled file to you quicker. I suggest requesting OpenVPN be added to the repos here:
http://linhes.org/projects/linhes/issues

Otherwise we are tampering with the system and you could have some issues as dependencies are updated, etc.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ] 
Go to page Previous  1, 2



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu