Colobridge WIKI

установка и настройка PPTP-сервера в OS Debian

Установка и настройка PPTP-сервера в OS Debian

Шаг 1. Установка PPTPD

apt-get install pptpd
Шаг 2. Редактирование IP настроек в /etc/pptpd.conf
nano /etc/pptpd.conf 
#start of custom file
#logwtmp
option /etc/ppp/options.pptpd
localip 192.168.0.1   # local vpn IP 
remoteip 192.168.0.100-200  # ip range for connections
listen 23.216.x.x # eth0 my example public IP and network interface
#end of custom file
Шаг 3. Добавьте пользователей в /etc/ppp/chap-secrets
nano /etc/ppp/chap-secrets 
usernameForuser1 *  setpassword1here  *
usernameForuser2 *  setpassword2here  *
Шаг 4. введите дополнительные настройки в /etc/ppp/options.pptpd
 nano /etc/ppp/options.pptpd 
</code> #custom settings for a simple fast pptp server ms-dns 8.8.8.8 ms-dns 4.2.2.2 lock name pptpd require-mschap-v2 # Require MPPE 128-bit encryption # (note that MPPE requires the use of MSCHAP-V2 during authentication) require-mppe-128 </code> Шаг 5. Включаем проброс пакетов в /etc/sysctl.conf
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
Применяем изминения командой:
 sysctl -p 

Шаг 6. Конфигурируем брандмауэр

apt-get install iptables-persistent
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE && /etc/init.d/iptables-persistent save
iptables -A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT && iptables -A INPUT -i eth0 -p gre -j ACCEPT && iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

Шаг 7. Запуск PPTP VPN сервера

service pptpd restart
chkconfig --level 2345 pptpd on 


Актуальность: 2015/12/22 11:38