VPN server pptpd (помогите прописать маршруты)

Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.

Модераторы: SLEDopit, Модераторы разделов

foxIG
Сообщения: 261
ОС: Mandriva 2010 PP

VPN server pptpd

Сообщение foxIG »

Создал VPN server через pptpd.
/etc/pptpd.conf

Код: Выделить всё

ppp /usr/sbin/pppd
option /etc/ppp/options.pptpd
debug
stimeout 10
logwtmp
bcrelay eth0
localip 192.168.0.78
remoteip 192.168.10.250-254


/etc/ppp/options.pptpd

Код: Выделить всё

name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
proxyarp
debug
lock
nobsdcomp
novj
novjccomp
nologfd
nodeflate
auth

/etc/ppp/chap-secrets
# client server secret IP addresses
user123 pptpd 123456 "192.168.10.251"
user2 pptpd 123 "192.168.10.252"

Клиент user123 подключаясь получает

Код: Выделить всё

ppp0   Link encap:Point-to-Point Protocol
          inet addr:192.168.0.78  P-t-P:192.168.10.252  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
          RX packets:64 errors:1 dropped:0 overruns:0 frame:0
          TX packets:2476 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:7560 (7.3 KiB)  TX bytes:231038 (225.6 KiB)


Клиент user2 подключаясь получает

Код: Выделить всё

ppp1      Link encap:Point-to-Point Protocol
          inet addr:192.168.0.78  P-t-P:192.168.10.251  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
          RX packets:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:588 (588.0 b)  TX bytes:288 (288.0 b)


route -n до подключения клиентов

Код: Выделить всё

[root@localhost xguest]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     10     0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     10     0        0 eth0
0.0.0.0         192.168.0.101   0.0.0.0         UG    10     0        0 eth0


route -n после подключения клиентов

Код: Выделить всё

[root@localhost xguest]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.10.252  0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.10.251  0.0.0.0         255.255.255.255 UH    0      0        0 ppp1
192.168.0.0     0.0.0.0         255.255.255.0   U     10     0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     10     0        0 eth0
0.0.0.0         192.168.0.101   0.0.0.0         UG    10     0        0 eth0



Код: Выделить всё

[root@localhost xguest]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:26:22:CF:79:7B
          inet addr:192.168.0.78  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4576 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2251 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2023531 (1.9 MiB)  TX bytes:326318 (318.6 KiB)
          Interrupt:17

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4080 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4080 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:478726 (467.5 KiB)  TX bytes:478726 (467.5 KiB)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:192.168.0.78  P-t-P:192.168.10.252  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
          RX packets:53 errors:1 dropped:0 overruns:0 frame:0
          TX packets:86 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:5593 (5.4 KiB)  TX bytes:8226 (8.0 KiB)

ppp1      Link encap:Point-to-Point Protocol
          inet addr:192.168.0.78  P-t-P:192.168.10.251  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
          RX packets:18 errors:0 dropped:0 overruns:0 frame:0
          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:1576 (1.5 KiB)  TX bytes:4599 (4.4 KiB)


что добавить в route чтобы 192.168.10.252 и 192.168.10.251 видели друг друга?
Спасибо сказали:
zakachkin
Сообщения: 137

Re: VPN server pptpd

Сообщение zakachkin »

foxIG писал(а):
13.01.2010 15:43
Создал VPN server через pptpd.
что добавить в route чтобы 192.168.10.252 и 192.168.10.251 видели друг друга?

на юзерских компах сеть
192.168.10.0/24 прокинуть через 192.168.0.78
Спасибо сказали: