Chinaunix首页 | 论坛 | 博客
  • 博客访问: 159292
  • 博文数量: 27
  • 博客积分: 97
  • 博客等级: 民兵
  • 技术积分: 314
  • 用 户 组: 普通用户
  • 注册时间: 2012-11-19 19:34
个人简介

非攻飞攻,夜尽天明!

文章分类

全部博文(27)

文章存档

2014年(6)

2013年(21)

我的朋友

分类: BSD

2014-01-07 19:31:46

已经使用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拨号上网了

   
  
  


阅读(2277) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~