(信息来源:http://www.hkepc.com/forum/redir ... 83&pid=26133470)
終極快速整合安裝指令 SSH翻牆 + HTTP PROXY + SOCKS4/5 PROXY + PPTP +UPNP + DDNS + 中文界面
只需要第一次用telnet 192.168.1.1連上,並直連上wan上到網即可
指令:
-------------------------------------------------------------------------------
opkg update
opkg install luci-mod-admin-full
opkg install uhttpd
opkg install luci-theme-openwrt
opkg install luci-app-upnp
opkg install luci-app-firewall
opkg install luci-app-ntpc
opkg install luci-i18n-chinese
opkg install libiwinfo
opkg install pptpd
opkg install kmod-mppe
opkg install luci-proto-pptp
opkg install srelay
opkg install tinyproxy
opkg install ntpclient
opkg install luci-app-ddns
rm /usr/bin/ssh
rm /usr/bin/scp
opkg install openssh-client
opkg install autossh
/etc/init.d/pptpd enable
/etc/init.d/pptpd start
/etc/init.d/uhttpd start
/etc/init.d/uhttpd enable
reboot
------------------------------------------------------------------------------
2. config pptpd
-----------------------------------
vi /etc/pptpd.conf
#debug
option /etc/ppp/options.pptpd
localip 192.168.1.1
remoteip 192.168.1.2-99
speed 1152000
stimeout 10
#localip & remoteip are not needed, ip management is done by pppd
--------------------------------------------
vi /etc/ppp/options.pptpd
auth
name "pptp-server"
lcp-echo-failure 3
lcp-echo-interval 60
default-asyncmap
mtu 1482
mru 1482
nobsdcomp
nodeflate
#noproxyarp
#nomppc
chapms-strip-domain
# Otherwise, your chap-secret file will have to include "DOMAIN\\user" instead of user.
mppe required,no40,no56,stateless
require-mschap-v2
refuse-chap
refuse-mschap
refuse-eap
refuse-pap
ms-dns 192.168.1.1
#plugin radius.so
#radius-config-file /etc/radius.conf
-----------------------------------------------------------
最後修改你pptp用戶名及密碼,格式: username空格*空格password空格*
vi /etc/ppp/chap-secrets
username * password *
-------------------------------------------------------------
3. 加firewall rule,令外網client能連接router及pptp上網.
vi /etc/firewall.user
iptables -A input_wan -p tcp --dport 1723 -j ACCEPT
iptables -A input_wan -p gre -j ACCEPT
iptables -A input_rule -i ppp+ -j ACCEPT
iptables -A forwarding_rule -i ppp+ -j ACCEPT
iptables -A forwarding_rule -o ppp+ -j ACCEPT
iptables -A output_rule -o ppp+ -j ACCEPT
-----------------------------------------------------------------------------
-----------------------------------------------------
vi /etc/srelay.conf
# allow local subnet to access socks proxy
192.168.1.0/24 any -
0.0.0.0 any
--------------------------------------------------------
vi /etc/init.d/srelay
#!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org
START=50
start() {
if [ -f /etc/srelay.conf ];then
srelay -i:1085 -c /etc/srelay.conf -r -s
fi
}
stop() {
killall srelay
}
-------------------------------------------------------------------
入去http://192.168.1.1內開啟WIFI |