- Timestamp:
- 02/28/18 18:24:39 (7 years ago)
- Branches:
- master, perl-5.22
- Children:
- 669bb09
- Parents:
- df958d5 (diff), 90f43e5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
npl/internetserver/openvpn_conf/root/service/openvpn/run
rdf958d5 r031ab69 1 1 #!/bin/bash 2 3 set -e 4 5 cd /etc/openvpn 6 7 # key generation moved here, otherwise it takes too long (now the system is generating more entrophy because it continues to start) 8 9 10 #basic setup 11 if ! [ -e pki ]; then 12 ./easyrsa init-pki 13 fi 14 15 #create ca cert 16 if ! [ -e pki/ca.crt ]; then 17 echo syn3 | ./easyrsa build-ca nopass 18 fi 19 20 #create server cert 21 if ! [ -e pki/issued/server.crt ]; then 22 ./easyrsa build-server-full server nopass 23 fi 24 25 #create dh parameters 26 if ! [ -e pki/dh.pem ]; then 27 ./easyrsa gen-dh 28 fi 29 30 #create CRL list 31 if ! [ -e pki/crl.pem ]; then 32 ./easyrsa gen-crl 33 fi 34 35 #openvpn group 36 if ! ( getent group | grep "OpenVPN access" &> /dev/null ) ; then 37 smbldap-groupadd -g 521 "OpenVPN access" || exit 1; 38 fi 39 40 #openvpn ipblock 41 NAME="OpenVPN clients" 42 if ! grep "$NAME" /etc/firewall/ipblocks; then 43 echo "$NAME='10.8.0.0/24'" >> /etc/firewall/ipblocks 44 fi 45 46 #create tlsauth key 47 if ! [ -e pki/ta.key ]; then 48 openvpn --genkey --secret pki/ta.key 49 fi 50 2 51 3 52 modprobe tun 4 53 5 cd /etc/openvpn6 54 exec openvpn --config openvpn.conf --config openvpn_syn3.conf --config openvpn_custom.conf
Note: See TracChangeset
for help on using the changeset viewer.