Install Poptop On FreeBSD
- 詳細內容
 - 分類: VPN
 - 發佈: 2006-07-24, 週一 23:11
 - 作者 Super User
 - 點擊數: 20067
 
Step 1 - Install Poptop:
cd /usr/ports/net/poptop
make install clean
Step 2 - Create a Poptop config file: /usr/local/etc/pptpd.conf
cp -rp /usr/local/etc/pptpd.conf.sample /usr/local/etc/pptpd.conf
vi /usr/local/etc/pptpd.conf
option /etc/ppp/ppp.conf
localip 10.8.0.1
remoteip 10.8.0.10-254
pidfile /var/run/pptpd.pid
nobsdcomp
proxyarp
+chapms-v2
mppe-40
mppe-128
mppe-stateless
noipparam
Be sure to replace ¨10.8.0.1〔 with your serverˇs IP address, and ¨10.8.0.10-254〔 is the range of IP addresses you want assigned to incoming clients. In this case, I only allocated 245 addresses.
Step 3 - Add an entry to /etc/ppp/ppp.conf
vi /etc/ppp/ppp.conf
pptp:
 set timeout 0
 set log phase chat connect lcp ipcp
 set dial
 set login
 enable mssfixup
 set ifaddr 10.8.0.1 10.8.0.10-10.8.0.254 255.255.255.0
 set server /tmp/loop "" 0177
 enable chap
 enable mschapv2
 disable pap
 enable proxy
 accept dns
 set dns 10.8.0.1
 set nbns 10.8.0.1
 set device !/etc/ppp/secure
Again, be sure to replace ¨10.8.0.1〔 with your serverˇs IP address, and ¨10.8.0.10-10.8.0.254〔 is the range of IP addresses for incoming clients. Youˇll also want to set appropriate DNS servers, as well as nbns (WINS) server if needed.
Step 4 - Create a password file /etc/ppp/ppp.secret
vi /etc/ppp/ppp.secret
It should contain lines such as:
username password
Note: I have not tried this but some have said that putting ¨enable passwordauth〃 in ppp.conf will authenticate against /etc/passwd. Using a separate file gives more control, but itˇs not as convenient.
Note 2: I shouldnˇt have to remind you that since the file contains passwords, it should be mode 0600 !
Step 5 - Enable pptpd in /etc/rc.conf:
vi /etc/rc.conf
pptpd_enable="YES"
Step 6 - Start pptpd:
/usr/local/etc/rc.d/pptpd start