利用しているOS は FreeBSD 4.7-RELEASE
ports に用意されている PoPToP を利用します。
% su # cd /usr/ports/net/poptop # make install && make clean
/usr/local/etc/pptpd.conf を作成。( pptpd.conf.sampleをコピー )
# cp /usr/local/etc/pptpd.conf.sample /usr/local/etc/pptpd.conf
/etc/ppp/ppp.conf に以下を追加
pptp: set ifaddr 192.168.2.1 0.0.0.0 255.255.255.255 enable pap chap mschap mschapv2 set log Phase Chat LCP IPCP CCP tun command set timeout 0
/etc/ppp/secret を作成。
ユーザ名とパスワードをこんな感じで列挙します。
# Authname Authkey Peer's IP address Label Callback usernamme1 05g4jv85j 192.168.2.11 usernamme2 d9rm$dotM 192.168.2.12 public1 pppaaasss 192.168.2.40-192.168.2.60このファイルもuserからは読めないようにするべきでしょう。
# chown root /etc/ppp/secret # chmod 400 /etc/ppp/secret
明示的に実行する必要があるときは以下のとおりです。
# /usr/local/etc/rc.d/pptpd.sh start
OSの起動時には自動的に実行されるように
/usr/local/etc/rc.d/pptpd.sh を作成します( pptpd.sh.sampleをコピー )
# cp /usr/local/etc/rc.d/pptpd.sh.sample /usr/local/etc/rc.d/pptpd.sh
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255 inet6 fe80::xxxx:xxff:fexx:xxxx%fxp0 prefixlen 64 scopeid 0x1 ether xx:xx:xx:xx:xx:xx media: Ethernet autoselect (100baseTX <full-duplex>) status: active fxp1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet6 fe80::xxxx:xxff:fexx:xxxx%fxp1 prefixlen 64 scopeid 0x2 ether xx:xx:xx:xx:xx:xx media: Ethernet autoselect (100baseTX <full-duplex>) status: active lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1452 inet 218.228.xxx.xxx --> 218.228.yyy.yyy netmask 0xffffffff Opened by PID xxx tun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1448 inet 192.168.1.100 --> 192.168.1.1 netmask 0xffffffff Opened by PID yyy tun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1438 inet 192.168.2.1 --> 192.168.2.11 netmask 0xffffffff Opened by PID zzz
Copyright© All rights reserved. Junkie 2002
Last Update 2002.11.3