Notes
Notes - notes.io |
if [ `/usr/bin/id -u` -ne 0 ]; then
echo Please run as root. Hint: use sudo.
exit 1;
fi
echo Installing OpenConnect..
apt-get install network-manager-openconnect-gnome
echo Installing 12VPN certificate..
mkdir -p /etc/openconnect
cat << EOF > /etc/openconnect/twelve.crt
-----BEGIN CERTIFICATE-----
MIIDKDCCApGgAwIBAgIJAIaRGfg5blTkMA0GCSqGSIb3DQEBBQUAMGwxCzAJBgNV
BAYTAlVTMQswCQYDVQQIEwJIUTEaMBgGA1UEChMRMTJWUE4gUGVyc29uYWwgVVMx
EjAQBgNVBAMTCTEydnBuLmNvbTEgMB4GCSqGSIb3DQEJARYRc3VwcG9ydEAxMnZw
bi5jb20wHhcNMTIwMzIzMDY1NjI4WhcNMjIwMzIxMDY1NjI4WjBsMQswCQYDVQQG
EwJVUzELMAkGA1UECBMCSFExGjAYBgNVBAoTETEyVlBOIFBlcnNvbmFsIFVTMRIw
EAYDVQQDEwkxMnZwbi5jb20xIDAeBgkqhkiG9w0BCQEWEXN1cHBvcnRAMTJ2cG4u
Y29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDme1yqSizTrvciHjpQ5lWc
KxAckRy5NCDIL+Dm+I6IMm+QiE5MTt4ak/A9AHTHrqGUULf6eOr1OAQ5aGYe6mfm
h04Rn/6GMANJgRQ+FZ/DGFTfSE1SLRvJXssG+dJTYXe+vm4Y1O1LJQDbzNuB5Ui2
Qe1mIRKasxtxjUZhZZYdBQIDAQABo4HRMIHOMB0GA1UdDgQWBBSbA94YsxH1CFau
HdRV154J46gJVTCBngYDVR0jBIGWMIGTgBSbA94YsxH1CFauHdRV154J46gJVaFw
pG4wbDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkhRMRowGAYDVQQKExExMlZQTiBQ
ZXJzb25hbCBVUzESMBAGA1UEAxMJMTJ2cG4uY29tMSAwHgYJKoZIhvcNAQkBFhFz
dXBwb3J0QDEydnBuLmNvbYIJAIaRGfg5blTkMAwGA1UdEwQFMAMBAf8wDQYJKoZI
hvcNAQEFBQADgYEABznspST+bRr00LLHnbhxvM6I/+niywplzX1LddzCXbgZbcbN
BPJv9eoFwI11kkXS/+kzjL/UxnlZ7T9veJpiIB7LvN8e5RkrjKvpFxWMLXMKRsYY
raVWrEE1ophhhMHKo31ku7UZjyDJ+KY/MJfNu8ZMEOUCrBuaSUAtL+GOOes=
-----END CERTIFICATE-----
EOF
echo Cleaning up old 12VPN servers..
rm -f /etc/NetworkManager/system-connections/octwelve *
echo Installing OpenConnect connections..
chmod 600 "/etc/openvpn/twelve/amsak.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve NL Amsterdam"
[connection]
id=NL Amsterdam
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=amsak.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve NL Amsterdam"
chmod 600 "/etc/openvpn/twelve/belac.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve BE Belgium"
[connection]
id=BE Belgium
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=belac.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve BE Belgium"
chmod 600 "/etc/openvpn/twelve/diaae.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve US Denver"
[connection]
id=US Denver
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=diaae.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve US Denver"
chmod 600 "/etc/openvpn/twelve/finsbury.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve US Chicago"
[connection]
id=US Chicago
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=finsbury.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve US Chicago"
chmod 600 "/etc/openvpn/twelve/fmtav.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve US Fremont"
[connection]
id=US Fremont
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=fmtav.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve US Fremont"
chmod 600 "/etc/openvpn/twelve/fraac.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve DE Frankfurt"
[connection]
id=DE Frankfurt
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=fraac.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve DE Frankfurt"
chmod 600 "/etc/openvpn/twelve/gatesart.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve US Dallas"
[connection]
id=US Dallas
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=gatesart.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve US Dallas"
chmod 600 "/etc/openvpn/twelve/hazana.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve US New York"
[connection]
id=US New York
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=hazana.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve US New York"
chmod 600 "/etc/openvpn/twelve/hkgaa.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve CN Hong Kong 2"
[connection]
id=CN Hong Kong 2
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=hkgaa.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve CN Hong Kong 2"
chmod 600 "/etc/openvpn/twelve/hkhae.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve CN Hong Kong"
[connection]
id=CN Hong Kong
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=hkhae.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve CN Hong Kong"
chmod 600 "/etc/openvpn/twelve/laxdat.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve US Los Angeles"
[connection]
id=US Los Angeles
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=laxdat.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve US Los Angeles"
chmod 600 "/etc/openvpn/twelve/laxgac.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve US China Optimized 1"
[connection]
id=US China Optimized 1
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=laxgac.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve US China Optimized 1"
chmod 600 "/etc/openvpn/twelve/laxiai.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve US China Optimized 3"
[connection]
id=US China Optimized 3
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=laxiai.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve US China Optimized 3"
chmod 600 "/etc/openvpn/twelve/lonbaj.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve UK London"
[connection]
id=UK London
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=lonbaj.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve UK London"
chmod 600 "/etc/openvpn/twelve/miaat.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve US Miami"
[connection]
id=US Miami
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=miaat.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve US Miami"
chmod 600 "/etc/openvpn/twelve/milbac.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve IT Milan"
[connection]
id=IT Milan
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=milbac.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve IT Milan"
chmod 600 "/etc/openvpn/twelve/nekuxiwe.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve NL Rotterdam"
[connection]
id=NL Rotterdam
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=nekuxiwe.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve NL Rotterdam"
chmod 600 "/etc/openvpn/twelve/paraa.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve FR Paris"
[connection]
id=FR Paris
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=paraa.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve FR Paris"
chmod 600 "/etc/openvpn/twelve/petrifie.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve US Atlanta"
[connection]
id=US Atlanta
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=petrifie.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve US Atlanta"
chmod 600 "/etc/openvpn/twelve/seadac.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve US Seattle"
[connection]
id=US Seattle
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=seadac.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve US Seattle"
chmod 600 "/etc/openvpn/twelve/sind.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve SG Singapore"
[connection]
id=SG Singapore
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=sind.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve SG Singapore"
chmod 600 "/etc/openvpn/twelve/tyobac.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve JP Tokyo"
[connection]
id=JP Tokyo
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=tyobac.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve JP Tokyo"
chmod 600 "/etc/openvpn/twelve/tyocc.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve JP Tokyo 3"
[connection]
id=JP Tokyo 3
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=tyocc.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve JP Tokyo 3"
chmod 600 "/etc/openvpn/twelve/tyohac.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve JP Tokyo 8"
[connection]
id=JP Tokyo 8
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=tyohac.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve JP Tokyo 8"
chmod 600 "/etc/openvpn/twelve/vpn-tlv.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve IL Tel Aviv"
[connection]
id=IL Tel Aviv
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=vpn-tlv.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve IL Tel Aviv"
chmod 600 "/etc/openvpn/twelve/vpn-zrh.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve CH Zurich"
[connection]
id=CH Zurich
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=vpn-zrh.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve CH Zurich"
chmod 600 "/etc/openvpn/twelve/wawad.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve PL Warsaw"
[connection]
id=PL Warsaw
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=wawad.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve PL Warsaw"
chmod 600 "/etc/openvpn/twelve/yowihimi.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve ES Madrid"
[connection]
id=ES Madrid
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=yowihimi.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve ES Madrid"
chmod 600 "/etc/openvpn/twelve/zozava.key"
cat <<EOF > "/etc/NetworkManager/system-connections/octwelve JP Tokyo 2"
[connection]
id=JP Tokyo 2
uuid=`uuidgen`
type=vpn
autoconnect=false
[vpn]
service-type=org.freedesktop.NetworkManager.openconnect
gateway=zozava.anuson.com
authtype=password
cacert=/etc/openconnect/twelve.crt
[ipv4]
method=auto
EOF
chmod 600 "/etc/NetworkManager/system-connections/octwelve JP Tokyo 2"
echo Reloading NetworkManager..
/usr/bin/nmcli c reload
echo Installing DNS helper..
cat <<EOF > "/etc/NetworkManager/dispatcher.d/S99octwelve"
#!/bin/sh
interface=$1
status=$2
case $status in
vpn-up)
dbus-send --system --dest=org.freedesktop.NetworkManager.dnsmasq --type=method_call /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetServers
dbus-send --system --dest=org.freedesktop.NetworkManager.dnsmasq --type=method_call /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetServers uint32:184483841
dbus-send --system --dest=org.freedesktop.NetworkManager.dnsmasq --type=method_call /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetServers uint32:184483841
;;
vpn-down)
;;
esac
EOF
chmod +x /etc/NetworkManager/dispatcher.d/S99octwelve
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team