Настройка mpd в качестве pptp клиента

—————-ВАРИАНТ НОМЕР РАЗ——————
— — cut here (mpd.conf) —
default:
load vpn

vpn:
new -i ng0 vpn vpn
set iface disable on-demand
set iface addrs 192.168.1.1 192.168.2.1
set iface idle 0
set iface route default
set bundle disable multilink
set bundle authname «XXXXXX»
set bundle password «YYYYYY»
set link yes acfcomp protocomp
set link disable chap pap
set link accept chap pap
# set link no pap
# set link yes chap
# If remote machine is NT you need this..
set link enable no-orig-auth
set link keep-alive 10 75
set ipcp yes vjcomp
set ipcp ranges 0.0.0.0/0 0.0.0.0/0
#
# The five lines below enable Microsoft Point-to-Point encryption
# (MPPE) using the ng_mppc(8) netgraph node type.
#
set bundle enable compression
set ccp yes mppc
set ccp yes mpp-e40
set ccp yes mpp-e128
set bundle enable crypt-reqd
set ccp yes mpp-stateless
open
— — cut here —

— — cut here (mpd.links) —
vpn:
set link type pptp
set pptp self A.B.C.D
set pptp peer X.Y.Z.W
set pptp enable originate incoming outcall
— — cut here —

XXXXXX — username
YYYYYY — password
A.B.C.D — твой IP
X.Y.Z.W — IP pptp сервера

——————ВАРИАНТ НОМЕР ДВА——————
———————————————————————————
mpd.conf
———————————————————————————-
default:
load vpn

vpn:
new -i ng0 vpn vpn
set iface disable on-demand
set iface idle 0
set iface up-script /usr/local/etc/mpd/io-up.sh
set iface down-script /usr/local/etc/mpd/io-down.sh
set iface route default
set bundle disable multilink
set bundle authname Vitali
set bundle password my_passv
set link yes acfcomp protocomp
set link disable chap pap
set link accept chap pap
set link enable no-orig-auth
set link keep-alive 10 75
set link mtu 1492
set ipcp yes vjcomp
set ipcp ranges 0.0.0.0/0 0.0.0.0/0
set ccp yes mpp-stateless
open

————————————————————————————
mpd.links
————————————————————————————
vpn:
set link type pptp
set pptp peer 10.119.16.1
set pptp enable originate outcall
————————————————————————————-
io-up.sh
————————————————————————————
#!/bin/sh
vpn_ip=10.119.16.1
ip_def_gw=10.118.128.1
/sbin/route delete $vpn_ip
/sbin/route add $vpn_ip $ip_def_gw
/sbin/route delete default
/sbin/route add default -interface ng0
————————————————————————————-
io-down.sh
————————————————————————————
#!/bin/sh
vpn_ip=10.119.16.1
ip_def_gw=10.118.128.1
/sbin/route delete default
/sbin/route add default $ip_def_gw
/sbin/route delete $vpn_ip
————————————————————————————

Настройка mpd в качестве pptp клиента: 1 комментарий

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.