OpenWRT, DD-WRT資源索引-選購,vpn,共享printer,scanner,BT等

本帖最後由 upsagel 於 2013-7-1 23:07 編輯

小的是OpenWRT的初學者,一路摸著石頭過河學習各種應用,為了不讓自己忘記每次都花一點點時間記下關鍵步驟,同時也稍稍繙譯一下那些因為網絡的資源多為英文為主。響應A大君置頂帖的鼓勵,小的雖不是什麽潛藏高手,也不期望精華熱貼,只想拋磚引玉,把我暫時的小小心得筆記分享給大家。我注意到第三方固件博大精深,希望大家如果有什麽好的資源,歡迎多多補充,我會加入到這個索引裡面。


DD-WRT,OpenWRT基本介紹、路由器購買相關

DD-WRT的功能和目的:人刷我又刷到底爲了什麽?
http://upsangel.byethost13.com/dd-wrt/dd-wrt-flash-purpose/

DD-WRT Router路由器選購指南、選擇注意事項考慮因素
http://upsangel.byethost13.com/dd-wrt/dd-wrt-router-buying-guide/

購買前必看:Buffalo WZR-300HP / WZR-HP-G300NH2刷DD-WRT的五個尚待解決的問題
http://upsangel.byethost13.com/dd-wrt/wzr-300-ddwrt-problem/



DD-WRT, OpenWRT的拓展應用

DD-WRT路由器網絡共享打印機Cloud Printing架設方法
http://upsangel.byethost13.com/d ... ud-printing-server/

OpenWRT共享打印機掃描儀設置Printer/Scanner Server的步驟
http://upsangel.byethost13.com/o ... ter-scanner-server/

DD-WRT VPN: 安全地使用公共WIFI(沒加密)的 Hotspot熱點接入
http://upsangel.byethost13.com/d ... pen-wifi-ddwrt-vpn/

利用DD-WRT減少WIFI輻射,保障家人健康
http://upsangel.byethost13.com/d ... ion-improve-health/

OpenWRT/DD-WRT路由器BT:不開電腦也可下載torrent
http://upsangel.byethost13.com/d ... uter-bt-bittorrent/

Samba:用網絡鄰居訪問路由器的usb儲存裝置(Openwrt, DD-wrt應用)
http://upsangel.byethost13.com/d ... -share-usb-storage/

OpenWRT路由器+雙核平板電腦組建高清播放XMBC
http://upsangel.byethost13.com/d ... r-tablet-hd-player/




希望本帖可以幫到每位第三方Firmware的路由器用家~如果我的筆記有任何錯誤缺漏,歡迎多多指正!

尚待補完的內容(如果大家有好的source請回帖子我會修改第一樓的索引):
WDS / Repeater / 2nd Router 的設置
Tomato , Gargoyle的介紹

----------6-27新增----------

OpenWRT路由器+智能電視DLNA組建xmbc
http://upsangel.byethost13.com/o ... -dlna-smart-t-xbmc/

PPTP和OpenVPN的設置(感謝gl5900as)
http://www.hkepc.com/forum/redir ... 88&pid=30156815
(upsangel的補充:如果發現鏈接了VPN但是上不了internet, 可以在etc/firewall.user中加入:iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j MASQUERADE)

----------7-1新增------------
OPENWRT上架設的PHP討論區(感謝gl5900as)
http://www.hkepc.com/forum/viewt ... &extra=page%3D1

剛開始接觸路由器, 這帖很有用.
收下了, 謝謝!

TOP

本帖最後由 lrh200888 於 2013-6-24 09:02 編輯

good! thank you!

TOP

路由器下載bt玩過,速度真系

TOP

回復 1# upsagel

支持樓主

TOP

無私的分享

TOP

好貼 待完整補完

TOP

多謝樓主無私的分享,已收下努力學習中!

TOP

OPENWRT PPTP + OPENVPN
  1. #-------pptp vpn------------#
  2. opkg update
  3. opkg install pptpd
  4. opkg install kmod-gre
  5. opkg install kmod-mppe
  6. opkg install kmod-ipt-conntrack-extra
  7. opkg install kmod-ipt-nat-extra
  8. opkg install iptables-mod-conntrack-extra
  9. #------------------openvpn-----------#
  10. opkg install openvpn-easy-rsa
  11. opkg install liblzo
  12. opkg install openvpn
  13. opkg install http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/openvpn_2.2.2-2_ar71xx.ipk
  14. opkg install http://downloads.openwrt.org/attitude_adjustment/12.09-beta/ar71xx/generic/packages/luci-app-openvpn_trunk%2bsvn9220-1_ar71xx.ipk
  15. /etc/init.d/openvpn enable
複製代碼
2. config pptpd
-----------------------------------
vi /etc/pptpd.conf
  1. #debug
  2. option /etc/ppp/options.pptpd
  3. localip 192.168.1.1
  4. remoteip 192.168.1.5-55
  5. speed 1152000
  6. stimeout 10
  7. #localip & remoteip are not needed, ip management is done by pppd
複製代碼
--------------------------------------------
vi /etc/ppp/options.pptpd
  1. auth
  2. name "pptp-server"
  3. lcp-echo-failure 3
  4. lcp-echo-interval 60
  5. default-asyncmap
  6. mtu 1482
  7. mru 1482
  8. nobsdcomp
  9. nodeflate
  10. #noproxyarp
  11. #nomppc
  12. chapms-strip-domain
  13. # Otherwise, your chap-secret file will have to include "DOMAIN\\user" instead of user.
  14. mppe required,no40,no56,stateless
  15. require-mschap-v2
  16. refuse-chap
  17. refuse-mschap
  18. refuse-eap
  19. refuse-pap
  20. ms-dns 192.168.1.1
  21. ms-dns 8.8.4.4
  22. ms-dns 8.8.8.8
  23. #plugin radius.so
  24. #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
  1. iptables -t nat -I PREROUTING -p gre -j DNAT
  2. iptables -A input_wan -p tcp --dport 1723 -j ACCEPT
  3. iptables -A input_wan -p gre -j ACCEPT
  4. iptables -A input_rule -i ppp+ -j ACCEPT
  5. iptables -A forwarding_rule -i ppp+ -j ACCEPT
  6. iptables -A forwarding_rule -o ppp+ -j ACCEPT
  7. iptables -A output_rule -o ppp+ -j ACCEPT
複製代碼
openvpn
/etc/config/openvpn
  1. config openvpn 'lan'
  2.         option enable '1'
  3.         option proto 'udp'
  4.         option dev 'tap0'
  5.         option ca '/etc/easy-rsa/keys/ca.crt'
  6.         option cert '/etc/easy-rsa/keys/server.crt'
  7.         option key '/etc/easy-rsa/keys/server.key'
  8.         option dh '/etc/easy-rsa/keys/dh1024.pem'
  9.         option ifconfig_pool_persist '/tmp/ipp.txt'
  10.         option keepalive '10 120'
  11.         option comp_lzo '1'
  12.         option persist_key '1'
  13.         option persist_tun '1'
  14.         option status '/tmp/openvpn-status.log'
  15.         option verb '3'
  16.         list push 'redirect-gateway'
  17.         list push 'dhcp-option DNS 192.168.1.1'
  18.         list push 'dhcp-option DNS 8.8.8.8'
  19.         list push 'route-gateway 192.168.1.1'
  20.         option port '1194'
  21.         option server '10.8.0.0 255.255.255.0'
  22.         option fast_io '1'
  23.         option enabled '1'

  24. config openvpn 'lan_TCP'
  25.         option ca '/etc/easy-rsa/keys/ca.crt'
  26.         option cert '/etc/easy-rsa/keys/server.crt'
  27.         option key '/etc/easy-rsa/keys/server.key'
  28.         option dh '/etc/easy-rsa/keys/dh1024.pem'
  29.         option ifconfig_pool_persist '/tmp/ipp.txt'
  30.         option keepalive '10 120'
  31.         option comp_lzo '1'
  32.         option persist_key '1'
  33.         option persist_tun '1'
  34.         option status '/tmp/openvpn-status.log'
  35.         option verb '3'
  36.         list push 'redirect-gateway'
  37.         list push 'dhcp-option DNS 192.168.1.1'
  38.         list push 'dhcp-option DNS 8.8.8.8'
  39.         list push 'route-gateway 192.168.1.1'
  40.         option dev 'tap1'
  41.         option server '10.7.0.0 255.255.255.0'
  42.         option port '1194'
  43.         option proto 'tcp-server'
  44.         option enable '1'
  45.         option enabled '1'

  46. config openvpn 'client_tap_bridge'
  47.         option dh 'dh1024.pem'
  48.         option ca 'ca.crt'
  49.         option key 'my_client.key'
  50.         option float '1'
  51.         option client '1'
  52.         option comp_lzo '1'
  53.         option dev 'tap'
  54.         option cert 'my_client.crt'
  55.         option management '127.0.0.1 31194'
  56.         option reneg_sec '0'
  57.         option verb '3'
  58.         option persist_key '1'
  59.         option nobind '1'
  60.         list remote 'vpnserver.example.org'
  61.         option remote_cert_tls 'server'
複製代碼

TOP

很有用的資料,謝分享

TOP