[Resolved] Script for OpenVPN connection

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
Jonmo1
Level 1
Level 1
Posts: 46
Joined: Mon Apr 28, 2014 11:02 am
Location: Bryan TX

[Resolved] Script for OpenVPN connection

Post by Jonmo1 » Sat Aug 17, 2019 6:35 pm

So I have the line below to connect to OpenVPN. It works great. But I have to manually enter passwords and such.
I'm hoping to have a script to run make the connection.

I can run this manually from Terminal.
sudo openvpn /etc/openvpn/Houston_udp.ovpn

It first prompts for my sudo password of coarse. I would not object to being prompted for that password.
But I would like to have the openvpn credentials automatically entered for me.


Any help would be appreciated. Thanks.
Last edited by Jonmo1 on Sat Aug 17, 2019 7:46 pm, edited 1 time in total.

User avatar
catweazel
Level 19
Level 19
Posts: 9802
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Script for OpenVPN connection

Post by catweazel » Sat Aug 17, 2019 7:26 pm

Jonmo1 wrote:
Sat Aug 17, 2019 6:35 pm
So I have the line below to connect to OpenVPN. It works great. But I have to manually enter passwords and such.
I'm hoping to have a script to run make the connection.
You should be able to import the VPN configuration into Mint's network manager. From there, you can import the certificate and automatically connect to the VPN when a connection is made. There should be no need for a script at all.

https://torguard.net/knowledgebase.php? ... icle&id=53

That's for ubuntu but it should give you at least the outline of what to do.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

Jonmo1
Level 1
Level 1
Posts: 46
Joined: Mon Apr 28, 2014 11:02 am
Location: Bryan TX

[Resolved] Script for OpenVPN connection

Post by Jonmo1 » Sat Aug 17, 2019 7:42 pm

Wow, I was making it harder than it needed to be (I'm good at that).

Thanks a ton, that worked perfectly.
Last edited by Jonmo1 on Sat Aug 17, 2019 7:44 pm, edited 1 time in total.

User avatar
catweazel
Level 19
Level 19
Posts: 9802
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Script for OpenVPN connection

Post by catweazel » Sat Aug 17, 2019 7:44 pm

Jonmo1 wrote:
Sat Aug 17, 2019 7:42 pm
Wow, I was making it harder than it needed to be (I'm good at that).

Thanks a ton, that worked perfectly.
:) My pleasure.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

Post Reply

Return to “Other networking topics”