-
-
Save pdaxrom/df84b07b5cbecee679cdd8d3ea5f2ddd to your computer and use it in GitHub Desktop.
OperaVPN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Log window is better readable this way | |
#route-nopull | |
script-security 2 | |
# run /etc/openvpn/up.sh when the connection is set up | |
up /etc/openvpn/opera.sh | |
down /etc/openvpn/opera.sh | |
suppress-timestamps | |
client | |
verb 5 | |
connect-retry-max 1 | |
resolv-retry 60 | |
dev tun | |
auth-user-pass auth.txt | |
<ca> | |
-----BEGIN CERTIFICATE----- | |
MIICbjCCAdegAwIBAgIJALpa3K/RGz7TMA0GCSqGSIb3DQEBBQUAMC8xCzAJBgNV | |
BAYTAkNBMQswCQYDVQQIEwJPTjETMBEGA1UEAxMKb3BlbnZwbi1jYTAeFw0xMjA4 | |
MjQxNDQxNDVaFw0yMjA4MjIxNDQxNDVaMC8xCzAJBgNVBAYTAkNBMQswCQYDVQQI | |
EwJPTjETMBEGA1UEAxMKb3BlbnZwbi1jYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw | |
gYkCgYEAsFp/304CrPQsoCwEZjTgxH0L8bDfTLvouIc2aGxg8SdhHspA7Gl8pEri | |
+NjpDV8Z1zwH7vbxMFbV4e9XNU/3OSEO+IcwOf4U376bKMmv7jRtGydo6sCN7vxK | |
npMhQ8gT+oViVfkZj2rj7XXXHLJBWnIDy7yfI+we3XBM+Izz3xsCAwEAAaOBkTCB | |
jjAdBgNVHQ4EFgQUPOII5Sm8xvtWnRvlWvXFnUkOMyUwXwYDVR0jBFgwVoAUPOII | |
5Sm8xvtWnRvlWvXFnUkOMyWhM6QxMC8xCzAJBgNVBAYTAkNBMQswCQYDVQQIEwJP | |
TjETMBEGA1UEAxMKb3BlbnZwbi1jYYIJALpa3K/RGz7TMAwGA1UdEwQFMAMBAf8w | |
DQYJKoZIhvcNAQEFBQADgYEAG0hBjHvj5JSm39QrjjKgGD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| |
BQADggEBAGAEOdtqjTsKOnZCUkyprM/bWudHV4q/MF/RWF26HzeFOz4hpwsTSPTv | |
V/D/FP+5zHC5ihzlxuALiehI2qIIPw55wdJZN/3OU+hcS+pLrIrMXI+BR07wbOmQ | |
cREpEn8WIz8/voUzTjr1ORrBEUkG6ntQYhOUbuPmFcthn7MjzechjHgwmbKcxEBS | |
1QRUFAmHHJj7WmoQqOzwESaEjy0uhOAJNopRfu5hCvzXRWZsfR9mOeM5jKm6cXTI | |
dbXle1wVXpFkkT0NEJ5afvrp8OEnFpxKLOxd42Lq1WLznuIzmPp6LmNagwdQJ+ey | |
5zsattm7vfKklM2ClUS1hFSICRzRne0= | |
-----END CERTIFICATE----- | |
</ca> | |
comp-lzo | |
nobind | |
<connection> | |
remote 49.213.19.78 | |
proto udp | |
port 5353 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.78 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.78 | |
proto udp | |
port 1194 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.78 | |
proto tcp-client | |
port 443 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.78 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.75 | |
proto udp | |
port 5353 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.75 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.75 | |
proto udp | |
port 1194 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.75 | |
proto tcp-client | |
port 443 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.75 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.71 | |
proto udp | |
port 5353 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.71 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.71 | |
proto udp | |
port 1194 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.71 | |
proto tcp-client | |
port 443 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.71 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.87 | |
proto udp | |
port 5353 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.87 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.87 | |
proto udp | |
port 1194 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.87 | |
proto tcp-client | |
port 443 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.87 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.91 | |
proto udp | |
port 5353 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.91 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.91 | |
proto udp | |
port 1194 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.91 | |
proto tcp-client | |
port 443 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.91 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.90 | |
proto udp | |
port 5353 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.90 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.90 | |
proto udp | |
port 1194 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.90 | |
proto tcp-client | |
port 443 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.90 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.57 | |
proto udp | |
port 5353 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.57 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.57 | |
proto udp | |
port 1194 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.57 | |
proto tcp-client | |
port 443 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.57 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.68 | |
proto udp | |
port 5353 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.68 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.68 | |
proto udp | |
port 1194 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.68 | |
proto tcp-client | |
port 443 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.68 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.54 | |
proto udp | |
port 5353 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.54 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.54 | |
proto udp | |
port 1194 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.54 | |
proto tcp-client | |
port 443 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.54 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.74 | |
proto udp | |
port 5353 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.74 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.74 | |
proto udp | |
port 1194 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.74 | |
proto tcp-client | |
port 443 | |
#connect-timeout 15 | |
</connection> | |
<connection> | |
remote 49.213.19.74 | |
proto udp | |
port 53 | |
#connect-timeout 15 | |
</connection> | |
# These Options were found in the config file do not map to config settings: | |
ns-cert-type server | |
ping 10 | |
ping-restart 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ed29ea9a3e7d6891fe508668a16d7a01f744c80f | |
3879FA56A348EBF153537A55F0A8DBDFA67A63F2D2738EE50AF2F71EC5209FB5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
[ "$script_type" ] || exit 0 | |
[ "$dev" ] || exit 0 | |
if [ "$script_type" = "down" ]; then | |
if [ -x /sbin/resolvconf ]; then | |
/sbin/resolvconf -d "${dev}.openvpn" | |
cat /var/run/openvpn/NetworkManager.${dev}.backup | /sbin/resolvconf -a NetworkManager | |
rm -f /var/run/openvpn/NetworkManager.${dev}.backup | |
/sbin/resolvconf -u | |
fi | |
elif [ "$script_type" != "up" ]; then | |
exit 0 | |
fi | |
CONF=/tmp/opera.ovpn | |
cat > $CONF << EOF | |
# Log window is better readable this way | |
#route-nopull | |
script-security 2 | |
# run /etc/openvpn/up.sh when the connection is set up | |
up /etc/openvpn/opera.sh | |
down /etc/openvpn/opera.sh | |
suppress-timestamps | |
client | |
verb 5 | |
connect-retry-max 1 | |
resolv-retry 60 | |
dev tun | |
auth-user-pass auth.txt | |
<ca> | |
-----BEGIN CERTIFICATE----- | |
MIICbjCCAdegAwIBAgIJALpa3K/RGz7TMA0GCSqGSIb3DQEBBQUAMC8xCzAJBgNV | |
BAYTAkNBMQswCQYDVQQIEwJPTjETMBEGA1UEAxMKb3BlbnZwbi1jYTAeFw0xMjA4 | |
MjQxNDQxNDVaFw0yMjA4MjIxND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EUBAW5nk3w0sxrxBE6+KPhcmWXdGJa | |
5GHkdrB4aX5MpbC2sCs58kzgYfepTE1So9LIAB80EGXDbfOTX5yCHywKAA7Ac9E6 | |
AjLaRswWR0yh57RuM9ySIKwv1Sw/ExCGahU0t84wjWWcJr3+jqENCZUfV1RhEn4K | |
qSiDW8A1HnKs/gqIAT5OEKys4iNYfTBqqJaBYbrGFAY1Jvme+Zku6HbZb2+9hkMu | |
x1sO1cbUo621PIDn16RJapXKTC3oyW06wLBd85DpOZbPR4gVzr3+acxAMc0fMhqS | |
dSzMWsHo58UzmmuBdW4qc1+c8h3zV9odAS0CAwEAAaOBkTCBjjAdBgNVHQ4EFgQU | |
cMoHZea7xGz+DoDc24doGnlE4FYwXwYDVR0jBFgwVoAUcMoHZea7xGz+DoDc24do | |
GnlE4FahM6QxMC8xCzAJBgNVBAYTAkNBMQswCQYDVQQIEwJPTjETMBEGA1UEAxMK | |
b3BlbnZwbi1jYYIJAKuDkCdxp6L+MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEL | |
BQADggEBAGAEOdtqjTsKOnZCUkyprM/bWudHV4q/MF/RWF26HzeFOz4hpwsTSPTv | |
V/D/FP+5zHC5ihzlxuALiehI2qIIPw55wdJZN/3OU+hcS+pLrIrMXI+BR07wbOmQ | |
cREpEn8WIz8/voUzTjr1ORrBEUkG6ntQYhOUbuPmFcthn7MjzechjHgwmbKcxEBS | |
1QRUFAmHHJj7WmoQqOzwESaEjy0uhOAJNopRfu5hCvzXRWZsfR9mOeM5jKm6cXTI | |
dbXle1wVXpFkkT0NEJ5afvrp8OEnFpxKLOxd42Lq1WLznuIzmPp6LmNagwdQJ+ey | |
5zsattm7vfKklM2ClUS1hFSICRzRne0= | |
-----END CERTIFICATE----- | |
</ca> | |
comp-lzo | |
nobind | |
EOF | |
for n in $(seq 1 100); do | |
zz="echo \$remote_$n" | |
remote=$(eval $zz) | |
if [ "$remote" = "" ]; then | |
break | |
fi | |
zz="echo \$proto_$n" | |
proto=$(eval $zz) | |
zz="echo \$remote_port_$n" | |
remote_port=$(eval $zz) | |
cat >> $CONF << EOF | |
<connection> | |
remote $remote | |
proto $proto | |
port $remote_port | |
#connect-timeout 15 | |
</connection> | |
EOF | |
done | |
cat >> $CONF << EOF | |
# These Options were found in the config file do not map to config settings: | |
ns-cert-type server | |
ping 10 | |
ping-restart 15 | |
EOF | |
# | |
# http://www.ipdeny.com/ipblocks/data/aggregated/cn-aggregated.zone | |
# | |
for n in $(cat /etc/openvpn/cn-aggregated.zone); do | |
/sbin/route add -net $n gw $route_net_gateway || break | |
done | |
cp -f $config ${config}.backup | |
cp -f $CONF $config | |
DNS="nameserver 8.8.8.8 | |
nameserver 8.8.4.4 | |
" | |
if [ -x /sbin/resolvconf ]; then | |
cp -f /var/run/resolvconf/interface/NetworkManager /var/run/openvpn/NetworkManager.${dev}.backup | |
/sbin/resolvconf -d NetworkManager | |
echo -n "$DNS" | /sbin/resolvconf -a "${dev}.openvpn" | |
/sbin/resolvconf -u | |
else | |
echo $DNS > /etc/resolv.conf | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment