Configure PPTP Server With PopTop on FreeBSD

本文详细介绍了如何在FreeBSD 7.2上安装并配置PPTP服务器使用PopTop。主要内容包括安装过程、配置pptpd.conf文件、设置/etc/ppp/ppp.conf选项、创建认证密钥文件以及启动服务等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

For some reason,  I need to set up a PPTP server on FreeBSD 7.2. I noticed two options to acheive this goal. One is PopTop. The other is MPD. I choose PopTop just because it is small and widely used. Sure, I did notice there are lots of articals and posts complaining about its configuration on FreeBSD. But, I decided to have a try. It took me about 2 days to make it work.

 

Installation is quite simple like any other package.

Once the package is successfully installed, there are several additional steps to make it work.

The first step is to create and edit the pptpd configuration file /usr/local/etc/pptpd.conf. You could simply copy  file /usr/local/etc/pptpd.conf.sample to /usr/local/etc/pptpd.conf. Then, edit it. Generally, you only need to specify localip and remoteip used by PPTPD. The most important thing is to comment out the following line. This is the thing that nearly make me mad.

option /etc/ppp/options.pptpd

With this line in the pptpd.conf, I always get the following error even you point it to correct file. In this case, I always get 619 error while making pptp connection to the server. Poptop maybe built with some kind of difference between FreeBSD and Linux.

Aug 20 18:33:27 WebServer ppp[2184]: Warning: Label /etc/ppp/ppp.conf rejected -direct connection: Configuration label not found

The next step is to make change to /etc/ppp/ppp.conf. There are many options here. I will not explain all of them. Just add the following part to the end of this config file.

 

pptp: # Note: leading spaces before each line below is critical. Do not remove.
        set timeout 0 
        #enable proxy
        set mrru
        accept dns
        enable MSChapV2  # Only accept MSChap2 authentication
        enable mppe
        disable pap
        disable chap
        disable mschap
        #set mppe * stateless
        #set dns 192.168.1.254  # Change it to your DNS
        set ifaddr 192.168.1.30 192.168.1.201-192.168.1.220 255.255.255.255 # Change it to your network addresses
        add default HISADDR                     # Add a (sticky) default route

 

Then,  make a secret file /etc/ppp/ppp.secret containing username and password for PPTP authentication.  Its content may like this:

username1  password

username2  password

The last step, add two lines to /etc/rc.conf.

# needed by PPTP server
gateway_enable="YES"
pptpd_enable="YES"

Now, you have nearly everything done. You can reboot and verify it. In case you already enabled gateway before doing this configuration, you can simply start and stop the pptp server with command lines:

/usr/local/etc/rc.d/pptpd start

/usr/local/etc/rc.d/pptpd stop

 

If it does not work, checking /var/log/message and /var/log/ppp.log may help. If you have anykind of firewall opened, be sure to enable TCP port 1723 and GRE package.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值