Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
uphrh-sb-devops
Commits
36b6f4dd
Commit
36b6f4dd
authored
7 years ago
by
manoj v
Browse files
Options
Download
Patches
Plain Diff
Issue #240 chore: add the openvpn script
parent
6e00f97d
release-1.3.1
release-1.3
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cloud/openvpn/openvpn.sh
+15
-0
cloud/openvpn/openvpn.sh
with
15 additions
and
0 deletions
+15
-0
cloud/openvpn/openvpn.sh
0 → 100644
+
15
−
0
View file @
36b6f4dd
#!/bin/bash
userPassword
=
$1
#download the packages
cd
/tmp
wget
-c
http://swupdate.openvpn.org/as/openvpn-as-2.1.9-Ubuntu16.amd_64.deb
#install the software
sudo
dpkg
-i
openvpn-as-2.1.9-Ubuntu16.amd_64.deb
#update the password for user openvpn
sudo echo
"openvpn:
$userPassword
"
|sudo chpasswd
#configure server network settings
PUBLICIP
=
$(
curl
-s
ifconfig.me
)
sudo
apt-get
install
sqlite3
sudo
sqlite3
"/usr/local/openvpn_as/etc/db/config.db"
"update config set value='
$PUBLICIP
' where name='host.name';"
#restart OpenVPN AS service
sudo
systemctl restart openvpnas
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets