freebsd系统下安装mpd

网络安全 2021-07-04 10:23www.168986.cn网络安全知识
1、mpd(都说mpd对windows支持最好),很简单
cd /usr/local/ports//mpd/ make all install clean 2、配置/usr/local/etc/mpd/mpd.conf default:
load vpn vpn:
load client1
#load client2
client1:
new -i ng0 pptp1 pptp1
set ipcp ranges x.x.x.x/32 y.y.y.y1/32
load pptp_def client2:
new -i ng1 pptp2 pptp2
set ipcp ranges x.x.x.x/32 y.y.y.y2/32
load pptp_def pptp_def:
set iface disable on-demand
set iface enable proxy-arp
set iface idle 1800
set bundle enable multilink
set link yes acfp pro
set link no pap chap
set link enable chap
set link keep-alive 10 60
set link mtu 1460
set ipcp yes vjp
set ipcp dns x.x.x.y set bundle enable pression
set p yes mppc
set p yes mpp-e40
set p yes mpp-e128
set p yes mpp-stateless
open
3、配置/usr/local/etc/mpd/mpd.links pptp1:
set link type pptp
set pptp self 对外提供vpn服务的ip
set pptp enable ining
set pptp disable originate
pptp2:
set link type pptp
set pptp self 对外提供vpn服务的ip set pptp enable ining
set pptp disable originate 4、编写启动脚本/usr/local/etc/rc.d/mpd.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'
;;
s)
killall mpd && echo -n ' mpd'
;;
*)
echo "Usage: `basename $0` {start|s}" <&2
exit 64
;;
esac
exit 0 5、编辑用户/口令文件 /usr/local/etc/mpd/mpd/secret 很简单,照着例子作
好了,现在要做的事做完了。在winxp上创建一个vpn连接,ok,搞定。嘿嘿,还有2个非常重要的点,第一个要将freebsd服务器成路由模式也就是说在/etc/rc.conf中gateway_enable="YES" 要加上(网上找的资料都没说着点,完全凭经验),否则不能通过vpn服务器访问内网的其他主机。第二,winxp的防火墙要关掉,为什么不知道,总之不关,就会出现间歇性大量掉包
 

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by