идею взято с
https://raw.githubusercontent.com/zhovner/zaborona_help/master/config/openvpn/ccd/DEFAULT
https://www.linuxspace.org/archives/18556
https://habrahabr.ru/post/329706/
https://habrahabr.ru/post/329248/comments/
сам сервер установлен с помощю
https://github.com/Angristan/OpenVPN-install
конфиги:
nano /etc/openvpn/server.conf
# Routes # POLONIEX network push "route 104.20.12.0 255.255.255.0" push "route 104.20.13.0 255.255.255.0"
Команды управления openvpn:
openvpn --config /etc/openvpn/server.conf - проверка выбранного конфига, нет ли в нём конфликтующих опций service openvpn stop service openvpn start service openvpn restart service openvpn status systemctl restart openvpn@server.service systemctl status openvpn@server.service
мой конфиг пример,
nano /etc/openvpn/server.conf
#local 10.2.33.201 port 1194 proto udp dev tun user nobody group nobody persist-key persist-tun keepalive 10 120 topology subnet server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "dhcp-option DNS 10.1.94.8" push "redirect-gateway def1 bypass-dhcp" crl-verify crl.pem ca ca.crt cert server.crt key server.key tls-auth tls-auth.key 0 dh dh.pem auth SHA256 cipher AES-128-CBC tls-server tls-version-min 1.2 tls-cipher TLS-DHE-RSA-WITH-AES-128-GCM-SHA256 status openvpn.log verb 3 #push "dhcp-option DNS 192.168.224.1" #push "dhcp-option DNS 74.82.42.42" # HE.net DNS #push "route 74.82.42.42" # Route to HE.net DNS #push "route 77.88.8.8" # Route to Yandex DNS #push "dhcp-option DNS6 2001:4860:4860::8888" # Google ipv6 dns #push "route-ipv6 2001:4860:4860::8888" #push "dhcp-option DNS6 2001:4860:4860::8844" # Google ipv6 dns #push "route-ipv6 2001:4860:4860::8844" #Persist TUN push "persist-tun" # Routes # Yandex network push "route 5.45.192.0 255.255.192.0" push "route 5.255.192.0 255.255.192.0" push "route 37.9.64.0 255.255.192.0" push "route 37.140.128.0 255.255.192.0" push "route 77.75.152.0 255.255.248.0" push "route 77.88.0.0 255.255.192.0" push "route 84.201.128.0 255.255.192.0" push "route 87.250.224.0 255.255.224.0" push "route 93.158.128.0 255.255.192.0" push "route 95.108.128.0 255.255.128.0" push "route 100.43.64.0 255.255.224.0" push "route 109.235.160.0 255.255.248.0" push "route 130.193.32.0 255.255.224.0" push "route 141.8.128.0 255.255.192.0" push "route 178.154.128.0 255.255.128.0" push "route 185.32.185.0 255.255.255.0" push "route 185.32.186.0 255.255.255.0" push "route 185.71.76.0 255.255.252.0" push "route 199.21.96.0 255.255.252.0" push "route 199.36.240.0 255.255.252.0" push "route 213.180.192.0 255.255.224.0" push "route-ipv6 2001:678:384::/48" push "route-ipv6 2620:10f:d000::/44" push "route-ipv6 2a02:6b8::/32" push "route-ipv6 2a02:5180::/32" # Mail.ru network push "route 5.61.16.0 255.255.248.0" push "route 5.61.232.0 255.255.248.0" push "route 79.137.157.0 255.255.255.0" push "route 79.137.183.0 255.255.255.0" push "route 94.100.176.0 255.255.240.0" push "route 95.163.32.0 255.255.224.0" push "route 95.163.248.0 255.255.248.0" push "route 128.140.168.0 255.255.248.0" push "route 178.22.88.0 255.255.248.0" push "route 178.237.16.0 255.255.240.0" push "route 185.5.136.0 255.255.252.0" push "route 185.16.148.0 255.255.252.0" push "route 185.16.244.0 255.255.252.0" push "route 188.93.56.0 255.255.248.0" push "route 194.186.63.0 255.255.255.0" push "route 195.211.20.0 255.255.252.0" push "route 195.211.128.0 255.255.252.0" push "route 195.218.168.0 255.255.255.0" push "route 208.87.92.0 255.255.252.0" push "route 217.20.144.0 255.255.240.0" push "route 217.69.128.0 255.255.240.0" push "route 185.6.244.0 255.255.252.0" push "route 185.30.176.0 255.255.252.0" push "route 195.218.190.0 255.255.254.0" push "route-ipv6 2a00:1148::/32" push "route-ipv6 2a00:a300::/32" push "route-ipv6 2a00:b4c0::/32" push "route-ipv6 2a04:4b40::/29" # VK.com network push "route 87.240.128.0 255.255.192.0" push "route 93.186.224.0 255.255.240.0" push "route 95.142.192.0 255.255.240.0" push "route 95.213.0.0 255.255.192.0" push "route 185.29.130.0 255.255.255.0" push "route 185.32.248.0 255.255.252.0" # Kaspersky network push "route 77.74.176.0 255.255.252.0" push "route 77.74.181.0 255.255.255.0" push "route 77.74.183.0 255.255.255.0" push "route 93.159.228.0 255.255.252.0" push "route 185.54.220.0 255.255.254.0" push "route 185.85.12.0 255.255.255.0" push "route 185.85.14.0 255.255.254.0" push "route 77.74.176.0 255.255.248.0" push "route 91.103.64.0 255.255.248.0" push "route 93.159.224.0 255.255.248.0" push "route-ipv6 2a03:2480::/33" # DrWeb push "route 178.248.232.183 255.255.255.255" push "route 178.248.233.94 255.255.255.255" push "route 195.88.252.0 255.255.254.0" # POLONIEX network push "route 104.20.12.0 255.255.255.0" push "route 104.20.13.0 255.255.255.0"