DD-wrt 入門

更新時間: 2013-07-20

 

 

Default Web Panel Login:

IP http://192.168.1.1

User: null

Passwork: null

 


 

tips

 

* 在用 HTTPS 時, 不能做 backup 及 firmware upgrade

* r18024 有 bug, 當主項目 Disable 時, Enable 的次選項都仍生放

 


 

下載

FTP: ftp://dd-wrt.com

最新版的 Path: /others/eko/BrainSlayer-V24-preSP2

 


 

支援 Router

 

TP-Link 740N

  • v2.5
    CPU Model: Atheros AR7240 rev 1.2 (0x00c2) 
    CPU Clock: 350 MHz
  • v4.21
    CPU Model: Atheros AR9330 rev 1
    CPU Clock:400.000MHz
    memory: 02000000
  •  

 

TP-Link WR941ND

 

  • 3.6
    Firmware Version: 3.11.8 Build 100712 Rel.61214n
    Hardware Version: WR941N v2/v3 00000000
    CPU Model Atheros AR9132 rev 2 (0xb9)
    CPU Clock400 MHz

 

TL-WR940N

  • Ver 1.3
    Firmware Version: 3.128
    Hardware Version: WR940N v1/WR941N v4

     

 

 

 


 

x86

 

smp / vga / serial 的分別

  • smp: simple multi processioring
  •  
  • vga: you have a keyboard and mouse
  • serial: 115200 / 8n1

 

public / full 的分別

  • dd-wrt_public.image    <---   Free [limited to 4096 connections, wifi support is missing ]
  • dd-wrt_full   <---   registered users

 

x86 的 mini Board (Soekris or Alix board)

Soekris

http://soekris.com/

ALIX system boards

http://pcengines.ch/alix.htm

alix2d13:
CPU: LX800 (AMD, 500MHz)
RAM: 256MB
Lan: 3
Size: 6x6"
IDE: 44 pin IDE header

很貴, 足以自己買一架 PC


 

Flash 工具 - mtd

 

找出相對應位置

cat /proc/mtd

dev:    size   erasesize  name
mtd0: 00020000 00010000 "RedBoot"
mtd1: 003c0000 00010000 "linux"
mtd2: 002a0000 00010000 "rootfs"
mtd3: 00040000 00010000 "ddwrt"
mtd4: 00010000 00010000 "nvram"
mtd5: 00010000 00010000 "board_config"
mtd6: 00400000 00010000 "fullflash"
mtd7: 00020000 00010000 "fullboot"

 

mtd Usage: mtd [<options> ...] <command> <device>

 

The device is in the format of mtdX (eg: mtd4) or its label.

mtd recognizes these commands:

        unlock                    unlock the device

        erase                     erase all data on device

        write <imagefile>   write <imagefile> (use - for stdin) to device

Following options are available:

        -r                      reboot after successful command

        -f                      force write without trx checks

        -e <device>             erase <device> before executing the command

 

Example:

To write linux.trx to mtd4 labeled as linux and reboot afterwards

mtd -r write linux.trx linux

 


 

nvram(permanent settings)

 

查看

nvram show

nvram get forward_spec

Backup / Restore

nvram backup config.txt
nvram restore filename

設置:

nvram set forward_spec=kvm-winxp:on:tcp:33389>192.168.123.31:3389

nvram unset <variable_name>

 

保存

nvram commit

 

Port Forward:

forward_spec: (Single Port Forwarding)

  • forwardspec_entries
  • forward_spec

forward_spec="kvm-winxp:on:tcp:33389>192.168.123.31:3389 lxc-server:off:tcp:222>192.168.123.10:22"

forwardspec_entries=2

forward_port: (Port Range Forwarding)

  • forward_port
  • forward_entries

forward_port="ftp:on:tcp:20:21>192.168.123.11 ftp(pasv):on:tcp:9101:9200>192.168.123.11"

forward_entries=2

 

設定 DNS

nvram set wan_dns="8.8.4.4 8.8.8.8 208.67.222.222"

nvram commit

P.S.

它與 /etc/resolv.conf 無關

 

 

 

Creative Commons license icon Creative Commons license icon