Jump to content
Usr6

PPTP VPN server

Recommended Posts

Posted

(in acest exemplu este folosit un vps cu CentOS 5.1)

Avem nevoie de 2 pachete instalate : ppp si pptpd

Instalarea:

ppp:

yum install ppp

pptpd :

yum install pptpd

Configurarea pptpd.conf

nano /etc/pptpd.conf

se poate sterge tot ce e pe acolo sa ramana :

option /etc/ppp/options.pptpd
localip 10.0.0.1
remoteip 10.0.0.10-100

10.0.0.1 este adresa clientului ppp iar 10.0.0.10-100 sunt adresele atribuite userilor

Configurarea options.pptpd

nano /etc/ppp/options.pptpd

name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
lock
nobsdcomp
novj
novjccomp
nologfd
ms-dns 8.8.8.8
ms-dns 8.8.4.4

8.8.8.8/8.8.4.4 sunt dns urile google, pot fi schimbate cu cele ale isp ului

Configurarea utilizatorilor:

nano /etc/ppp/chap-secrets


# Secrets for authentication using CHAP
# client server secret IP addresses
utilizator1 pptpd parola1 *
utilizator2 pptpd parola2 *

Activarea Ip forwarding:

nano /etc/sysctl.conf

se schimba net.ipv4.ip_forward = 0 in net.ipv4.ip_forward = 1,

activarea schimbarilor:

sysctl -p

Configurare NAT:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Editarea permisiilor iptables:

iptables -A INPUT -i eth0 -p tcp --dport 1723 -j ACCEPT

iptables -A INPUT -i eth0 -p gre -j ACCEPT

pptp foloseste portul 1723 pentru a stabili conexiunea

GRE= Generic Route Encapsulation

-pentru a "routa" tot traficul prin serverul pptp

iptables -A FORWARD -i ppp+ -o eth0 -j ACCEPT

iptables -A FORWARD -i eth0 -o ppp+ -j ACCEPT

Pornirea serverului pptp

service pptpd start

* pentru probleme legate de MTU (Maximum transmission unit)

nano /etc/ppp/ip-up

se adauga la penultima linie

/sbin/ifconfig $1 mtu val

val se inlocuieste cu mtu dorit ex 1024

service pptpd restart

surse de inspiratie: 1 2

Posted

Felicitari pentru tutorial.

Ce trebuie mentionat e ca PPTP VPN e un proto de VPN blocat de majoritatea providerilor de net, si e considerat nesigur.

Mai degraba se recomanda un openvpn :)

Bafta

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...