已经使用freebsd  mpd5 配置好了一台VPN服务器  192.168.1.155

配置的VPN网关为 192.168.1.9

客户端自动获取IP 的 默认网关为 172.18.1.1

1.先安装好 mpd5
    #cd /usr/ports/net/mpd5/
    #make install clean

   #vi /etc/rc.conf
     
          mpd_enable="YES"

2.   #vi /usr/local/etc/mpd5/mpd.conf
   
    将:
       load  dialup    
     修改为:
       #load dialup
       load  pptp_client

     修改pptp_client:
          
pptp_client:
#
# PPTP client: only outgoing calls, auto reconnect,
# ipcp-negotiated address, one-sided authentication,
# default route points on ISP's end
#

        create bundle static B1
        set iface route default
        set ipcp ranges 0.0.0.0/0 0.0.0.0/0

        create link static L1 pptp
        set link action bundle B1
        set auth authname qsy  (用户名)
        set auth password yao (密码)
        set link max-redial 0
        set link mtu 1460
        set link keep-alive 20 75
        set pptp peer 192.168.1.155  ( VPN服务器IP)
        set pptp disable windowing
        open


   # /usr/local/etc/rc.d/mpd5 restart

3.接着,一定要修改默认路由才可以上网
                                       
   # route add -host   192.168.1.155   172.18.1.1  
   # route delete default
   # route add default   192.168.1.9
                                  
终于可以mpd5 vpn拨号上网了

   
  
  


12-08 05:01