Merhaba,
Kurulum ve config ayarları için kısa bir aktarımda bulunacağım.
Öncelikle firewalld yi kontrol ediyoruz.
# systemctl status firewalld
Eğer firewalld çalışyorsa kaldırmanızı öneririm. Ayrıca pptpd indirmek için kullanacağımız wgeti de kurmanız gerekebilir.
# systemctl disable firewalld
# yum remove firewalld
# yum install wget
1. Adım: pptpd yüklüyoruz.
# yum install ppp iptables-services perl
# cd /usr/local/src -64bit İçin # wget http://poptop.sourceforge.net/yum/st...el6.x86_64.rpm
# rpm -Uhv pptpd-1.4.0-1.el6.x86_64.rpm -32bit için
# wget http://poptop.sourceforge.net/yum/st...1.el6.i686.rpm
# rmp -Uhv pptpd-1.4.0-1.el6.i686.rpm
2. Adım: pptpd Ayarları # vi /etc/pptpd.conf localip 192.168.0.1
VPS veya Fiziksel Server IP adresi remoteip 192.168.0.101-200
VPN'e bağlanacak cihazlara atanacak IP'lerSonra ppp ayarlarını yapıyoruz
# vi /etc/ppp/options.pptpd ms-dns 8.8.8.8 ms-dns 8.8.4.4
3. Adım: Kullanıcı Oluşturuyoruz.
ppp ayarlarımızı da yaptık. Şimdi VPN için kullanıcı oluşturacağız.
# vi /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses vpn pptpd your_pass
*
4. Adım: Ağ ayarları ve IPTables Ayarları.
Şimdi sistemin ip forward yapmasını, port açmasını ve sanal ağın ana ağa yönlenmesini sağlayalım.
# sysctl -w net.ipv4.ip_forward=1
# vi /etc/sysconfig/iptables
-A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT
-A INPUT -i eth0 -p gre -j ACCEPT
-A POSTROUTING -o eth0 -j MASQUERADEIP
Tables hata verirse (Genelde sanal makinelerde verecektir)
-A POSTROUTING -o eth0 -j MASQUERADEsatırını silerek yerine,
-A POSTROUTING -s 192.168.0.0/24 -j SNAT --to-source SUNUCU_WAN_IP
*eğer sunucunuz localde ise sunucunun local ip si 192.168.1.1 gibiastırını yazıyoruz.
Artık PPTP VPN sunucumuzu çalıştırabiliriz. # systemctl start iptables # service pptpd start # chkconfig pptpd on