Skip to content

Commit 8b72a37

Browse files
authored
Merge pull request #134 from sobelek/master
Added simple script to connect to openvpn vpn
2 parents b412a02 + 67bb07b commit 8b72a37

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Script to connect to vpn via openvpn with free vpnbook.
2+
Before using it is required to install openvpn, dowload config from vpnbook and show path to its in script
3+
From time to time vpnbook changes password and it is required to change it in a script by hand.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
cd ~/Downloads/vpn-de
3+
username="vpnbook"
4+
password="hd4se2m"
5+
read -sp "Enter Sudo Password: " sudopassword
6+
/usr/bin/expect << EOF
7+
spawn sudo openvpn vpnbook-de4-tcp80.ovpn
8+
expect "password for $USER: "
9+
send "$sudopassword\r"
10+
expect "Enter Auth Username: "
11+
send "$username\r"
12+
expect "Enter Auth Password: "
13+
send "$password\r"
14+
expect "$ "
15+
EOF

0 commit comments

Comments
 (0)