Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # for manual ovpn add of pia vpns
- # get pia ovpn profiles, load them using:
- # for i in *.ovpn; do nmcli connection import file "$i" type openvpn; done
- # then:
- # for i in "*"; do /root/Downloads/ovpn/pia_ovpn_mod.sh "$i"; done
- # Changes password-flags from 1 to 0
- # sed -i 's/password-flags=1/password-flags=0/g' $1
- sed -i 's/ca=\/root\/Downloads\/ovpn\/.\/ca.rsa.2048.crt/ca=\/etc\/NetworkManager\/pia\/ca.rsa.2048.crt/g' $1
- # Adds in a username entry after reneg-seconds
- sed -i '/reneg-seconds=0/a username=username' $1
- # remove trailing gateway
- sed -i '/:1198/a port=1198' $1
- sed -i 's/:1198//' $1
- # replace bad ciphers
- sed -i 's/aes-128-cbc/AES-128-CBC/' $1
- sed -i 's/sha1/SHA1/' $1
- # Adds in a section [vpn-secrets] for passwords after line 21
- # sed -i '21 a [vpn-secrets]' $1
- # Adds in password into the config file after [vpn-secrets]
- # sed -i '/\[vpn-secrets]/a password=password' $1
- # Adds in a new line after password=
- # sed -i '/password=/a\\' $1
Add Comment
Please, Sign In to add comment