Created
November 19, 2015 07:40
-
-
Save glavk/93a2192263a8f86db9c6 to your computer and use it in GitHub Desktop.
Double VPN vps2 restore after restart
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
# включение маршрутизации | |
sysctl -w net.ipv4.ip_forward=1 | |
# правила межсетевого экрана и NAT | |
iptables -F FORWARD | |
iptables -A INPUT -i tun+ -j ACCEPT | |
iptables -A FORWARD -i tun+ -j ACCEPT | |
iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j SNAT --to-source 5.79.97.139 | |
# монтирование tmpfs | |
mount -o size=10M -t tmpfs none /etc/openvpn/ | |
# копирование конфигурации в /etc/openvpn через WinSCP, scp/ssh | |
# запуск сервера | |
openvpn --config server_vps2.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment