FREEBSD下VPN的安装配置详细教程
2018-09-19 来源:爱站科技
今天小编跟大家分享一篇关于FREEBSD下VPN的安装配置详细教程,感兴趣的朋友跟小编一起来了解一下吧!
目标: 达到使用Windows 2000/XP进行VPN拨号连接, 软件选用mpd
1 mpd的安装
通过ports安装mpd
# cd /usr/ports/net/mpd
# make all install clean
2 mpd的配置
VPN配置文件有mpd.conf, mpd.links, mpd.secret
/usr/local/etc/mpd/mpd.conf配置如下:
default:
load vpn
vpn:
new -i ng1 vpn vpn
set iface disable on-demand
set iface addrs 192.168.0.1
set iface idle 0
set iface route 192.168.0.0/24
set bundle disable multilink
set bundle authname "VpnLogin"
set bundle password "VpnPassword"
set link yes acfcomp protocomp
set link no pap
set link yes chap
set link mtu 1460
# 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 192.168.0.1/32 192.168.0.254/32
#
# 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
/usr/local/etc/mpd/mpd.links配置如下:
vpn:
set link type pptp
set pptp self 192.168.0.1
# set pptp peer 2.3.4.5
set pptp enable originate incoming outcall
/usr/local/etc/mpd/mpd.secret是用户的帐号和密码:
jerry "11111111"
emma "88888888"
test "test" 192.168.0.254
/usr/local/etc/rc.d/mpd.sh
#! /bin/sh
case $1 in
start)
[ -x /usr/local/sbin/mpd ] && \
[ -f "/usr/local/etc/mpd/mpd.conf" ] && \
/usr/local/sbin/mpd -b && \
echo -n ' mpd'
;;
stop)
killall mpd && echo -n ' mpd'
;;
*)
echo "Usage: `basename $0` {start|stop}"
exit 64
;;
esac
exit 0
使用`mpd.sh start'启动, 在另一台WinXP上添加网络连接, 使用VPN, 输入用户和密码及主机地址就可以连上了。
以上就是关于FREEBSD下VPN的安装配置详细教程,想必都了解了吧,更多相关内容请继续关注爱站技术频道。
标签: 网络
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点!
本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。