Google Code Prettify

2009年2月8日日曜日

iPhoneからDD-WRT (v23sp2 vpn)なルーターにVPN接続

DD-WRTの通常の設定項目のほかに、下記の設定が必要だったのでメモメモ。 このページを参考に。 VPN Howto: Linksys + DD-WRT + PPTP + Mac OS X Client

The PPTP Server is now configured. However, we need to create a startup script to overwrite one of the PPTP config files. 3) Click on Administration, Diagnostics. In the Commands text area, paste the following script:
echo 'lock' > /tmp/pptpd/options.pptpd
echo 'name *' >> /tmp/pptpd/options.pptpd
echo 'proxyarp' >> /tmp/pptpd/options.pptpd
echo 'ipcp-accept-local' >> /tmp/pptpd/options.pptpd
echo 'ipcp-accept-remote' >> /tmp/pptpd/options.pptpd
echo 'lcp-echo-failure 3' >> /tmp/pptpd/options.pptpd
echo 'lcp-echo-interval 5' >> /tmp/pptpd/options.pptpd
echo 'deflate 0' >> /tmp/pptpd/options.pptpd
echo 'auth' >> /tmp/pptpd/options.pptpd
echo '-chap' >> /tmp/pptpd/options.pptpd
echo '-mschap' >> /tmp/pptpd/options.pptpd
echo '+mschap-v2' >> /tmp/pptpd/options.pptpd
echo 'mppe required' >> /tmp/pptpd/options.pptpd  #this line forces encryption and fixes OS X
echo 'mppe stateless' >> /tmp/pptpd/options.pptpd
echo 'mppc' >> /tmp/pptpd/options.pptpd
echo 'ms-ignore-domain' >> /tmp/pptpd/options.pptpd
echo 'chap-secrets /tmp/pptpd/chap-secrets' >> /tmp/pptpd/options.pptpd
echo 'ip-up-script /tmp/pptpd/ip-up' >> /tmp/pptpd/options.pptpd
echo 'ip-down-script /tmp/pptpd/ip-down' >> /tmp/pptpd/options.pptpd
echo 'ms-dns 192.168.1.1'   >> /tmp/pptpd/options.pptpd #enter your router's ip here
echo 'mtu 1450' >> /tmp/pptpd/options.pptpd
echo 'mru 1450' >> /tmp/pptpd/options.pptpd
Make sure to replace "192.168.1.1" with your the LAN IP of your router, if it's different. Click Save Startup. The router is configured, let's setup the VPN connection in OS X.