pptpd

Материал из ALT Linux Wiki

Настройка сервера PPTP

# apt-get install pptpd

Настройки сервера pptpd:

$ cat /etc/pptpd.conf
localip 192.168.99.1
remoteip 192.168.99.200-238,192.168.99.245
  • localip — адрес сервера
  • remoteip — список адресов, которые будут выдаваться клиентам

Настройка параметров соединения:

/etc/ppp/options.pptpd

Задание пользователей и паролей:

$ cat /etc/ppp/chap-secrets
ЛОГИН pptpd ПАРОЛЬ *

Включаем сервис:

# chkconfig pptpd on
# service pptpd start
Starting pptpd service: [ DONE ]

В системных логах должно записываться, как проходит соединение:

2020-09-08T03:35:29.029209+03:00 gateway2 pptpd[135231]: CTRL: Client 192.168.0.55 control connection started
2020-09-08T03:35:30.027996+03:00 gateway2 pptpd[135231]: CTRL: Starting call (launching pppd, opening GRE)
2020-09-08T03:35:30.034347+03:00 gateway2 pppd[135232]: Plugin /usr/lib64/pptpd/pptpd-logwtmp.so loaded.
2020-09-08T03:35:30.034786+03:00 gateway2 pppd[135232]: pppd 2.4.7 started by lav, uid 0
2020-09-08T03:35:30.035508+03:00 gateway2 pppd[135232]: Using interface ppp1
2020-09-08T03:35:30.035699+03:00 gateway2 pppd[135232]: Connect: ppp1 <--> /dev/pts/7
2020-09-08T03:35:30.037762+03:00 gateway2 pppd[135232]: peer from calling number 192.168.0.55 authorized
2020-09-08T03:35:30.040051+03:00 gateway2 pppd[135232]: local  IP address 192.168.11.1
2020-09-08T03:35:30.040061+03:00 gateway2 pppd[135232]: remote IP address 192.168.11.234
2020-09-08T03:35:30.238331+03:00 gateway2 pppd[135232]: Script /etc/ppp/ip-up finished (pid 135235), status = 0x0
2020-09-08T03:36:13.154202+03:00 gateway2 pppd[135232]: Hangup (SIGHUP)
2020-09-08T03:36:13.154222+03:00 gateway2 pppd[135232]: Modem hangup
2020-09-08T03:36:13.154595+03:00 gateway2 pppd[135232]: Connect time 0.8 minutes.
2020-09-08T03:36:13.154603+03:00 gateway2 pppd[135232]: Sent 420 bytes, received 1915 bytes.
2020-09-08T03:36:13.157628+03:00 gateway2 pppd[135232]: Connection terminated.
2020-09-08T03:36:13.286869+03:00 gateway2 pppd[135232]: Script /etc/ppp/ip-down finished (pid 135245), status = 0x1
2020-09-08T03:36:13.287021+03:00 gateway2 pppd[135232]: Exit.

Ссылки