网络环境:局域网一台跑vmware的2K3主机,上端有路由器通过ADSL方式联入INTERNET。
从官网http://downloads.openwrt.org/snapshots/trunk/x86/openwrt-x86-generic-combined-ext4.img.gz
下载固件到硬盘。
解压,虚拟机光驱加载winpe,用physdiskwrite将固件写入到虚拟机磁盘上。
写入完毕关机,在虚拟机设置中将光驱移除,开机。
进入系统后设置网络接口,将eth1设置为wan口:
vi /cd etc/config/network
config 'interface' 'wan'
option 'ifname' 'eth1'
option 'proto' 'dhcp'
option 'defaultroute' '1'
option 'peerdns' '0'
option 'dns' '8.8.8.8'
关虚拟机,在虚拟机设置中将eth1对应的网卡桥接在物理网卡1上(此网卡连局域网路由器),重启openwrt。
然后在局域网路由器里面可以给openwrt的wan口分到IP地址,此时openwrt可以访问网络。
然后继续安装luci
opkg update
opkg intsall luci
安装完毕启动luci
/etc/init.d/uhttpd enable
/etc/init.d/uhttpd start
由于openwrt里面防火墙的默认设置,无法直接通过wan口访问luci界面,先关掉防火墙:
/etc/init.d/firewall stop
此时可以通过web访问luci界面,但是密码未设置,此时是不能登入luci的。
telnet到路由器,passwd设置密码,完成后登录luci界面。
月度归档:2011年04月
Belkin Play F7D4302v1 超频至480Mhz
发现 Belkin F7D4302v1 的CPU和610n v2一样都是 CPU type 0x19740,而610n v2频率为480Mhz,试图超频F7D4302v1。
nvram set clkfreq=480
nvram commit
重启后正常进入系统。
root@DD-WRT
:~# nvram show |grep freq
xtalfreq=20000
clkfreq=480
root@DD-WRT
:~# cat /proc/cpuinfo
system type : Broadcom BCM4716 chip rev 1
processor : 0
cpu model : MIPS 74K V4.0
BogoMIPS : 239.20
wait instruction : no
microsecond timers : yes
tlb_entries : 64
extra interrupt vector : no
hardware watchpoint : yes
ASEs implemented : mips16 dsp
shadow register sets : 1
VCED exceptions : not available
VCEI exceptions : not available
dcache hits : 2147483648
dcache misses : 2103333871
icache hits : 2147483648
icache misses : 266296085
instructions : 2147483648
启动信息:
Linux version 2.6.24.111 (eko@dd-wrt
) (gcc version 4.1.2) #2275 Fri Sep 10 11:54:44 CEST 2010
CPU revision is: 00019740
Determined physical RAM map:
memory: 04000000 @ 00000000 (usable)
On node 0 totalpages: 16384
Normal zone: 128 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 16256 pages, LIFO batch:3
Movable zone: 0 pages used for memmap
Built 1 zonelists in Zone order. Total pages: 16256
Kernel command line: console=ttyS0,115200 root=1f02 rootfstype=squashfs noinitrd
Primary instruction cache 32kB, physically tagged, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, linesize 32 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 256 (order: 8, 1024 bytes)
CPU: BCM4716 rev 1 at 480 MHz
Using 240.000 MHz high precision timer.
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 59768k/65536k available (3144k kernel code, 5704k reserved, 1479k data, 144k init, 0k highmem)
Calibrating delay loop… 239.20 BogoMIPS (lpj=1196032)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Generic PHY: Registered new driver
PCI: Using membase 8000000
PCI: Initializing host
PCI: Reset RC
PCI: Fixing up bus 0
PCI: Fixing up bridge
PCI: Setting latency timer of device 0000:01:00.0 to 64
PCI: Fixing up bridge
PCI: Setting latency timer of device 0000:01:00.1 to 64
PCI: Enabling device 0000:01:00.1 (0004 -> 0006)
PCI: Fixing up bus 1
NET: Registered protocol family 2
Time: MIPS clocksource has been installed.
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
F7D4302v1 GPIO Init
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au
)
devfs: boot_options: 0x1
squashfs: version 3.0 (2006/03/15) Phillip Lougher
io scheduler noop registered
io scheduler deadline registered (default)
HDLC line discipline: version $Revision: 4.8 $, maxframe=4096
N_HDLC line discipline registered.
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x0 (irq = 8) is a 16550A
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
MPPE/MPPC encryption/compression module registered
NET: Registered protocol family 24
PPPoL2TP kernel driver, V1.0
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com
>
PCI: Setting latency timer of device 0000:00:02.0 to 64
eth0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 5.10.56.27
PCI: Setting latency timer of device 0000:00:01.0 to 64
Physically mapped flash: Found 1 x16 devices at 0x0 in 8-bit bank
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Flash device: 0x800000 at 0x1c000000
Found Belkin Play magic
bootloader size: 196608
nvram size: 32768
Physically mapped flash: Filesystem type: squashfs, size=0x63390b
partition size = 6564864
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00030000 : "cfe"
0x00030000-0x007f0000 : "linux"
0x0017d400-0x007c0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary — force read-only
0x007f0000-0x00800000 : "nvram"
0x007c0000-0x007f0000 : "ddwrt"
Found a 0MB serial flash
sflash: found no supported devices
Broadcom Watchdog Timer: 0.07 initialized.
u32 classifier
Actions configured
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
ctnetlink v0.93: registering with nfnetlink.
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
ip_tables: (C) 2000-2006 Netfilter Core Team
ClusterIP Version 0.8 loaded successfully
TCP bic registered
TCP cubic registered
TCP westwood registered
TCP highspeed registered
TCP hybla registered
TCP htcp registered
TCP vegas registered
TCP scalable registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Welcome to PF_RING 3.2.1
(C) 2004-06 L.Deri <deri@ntop.org
>
NET: Registered protocol family 27
PF_RING: bucket length 128 bytes
PF_RING: ring slots 4096
PF_RING: sample rate 1 [1=no sampling]
PF_RING: capture TX No [RX only]
PF_RING: transparent mode Yes
PF_RING initialized correctly.
PF_RING: registered /proc/net/pf_ring/
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com
>
All bugs added by David S. Miller <davem@redhat.com
>
decode 1f02
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 144k freed
roboswitch: Probing device eth0: found!
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
USB20H mdio control register : 0x8000000c
PCI: Setting latency timer of device 0000:00:04.1 to 64
ehci_hcd 0000:00:04.1: EHCI Host Controller
ehci_hcd 0000:00:04.1: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:04.1: irq 5, io mem 0x18004000
ehci_hcd 0000:00:04.1: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
USB Universal Host Controller Interface driver v3.0
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
USB20H mdio control register : 0x8000000c
PCI: Setting latency timer of device 0000:00:04.0 to 64
ohci_hcd 0000:00:04.0: OHCI Host Controller
ohci_hcd 0000:00:04.0: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:04.0: irq 5, io mem 0x18009000
usb 1-1: new high speed USB device using ehci_hcd and address 2
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usb 1-1: configuration #1 chosen from 1 choice
SCSI subsystem initialized
Initializing USB Mass Storage driver…
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
usbcore: registered new interface driver usblp
br0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
device br0 entered promiscuous mode
Algorithmics/MIPS FPU Emulator v1.5
device vlan1 entered promiscuous mode
device eth0 entered promiscuous mode
device eth1 entered promiscuous mode
br0: port 2(eth1) entering learning state
br0: port 1(vlan1) entering learning state
device br0 left promiscuous mode
device br0 entered promiscuous mode
device br0 left promiscuous mode
device br0 entered promiscuous mode
scsi 0:0:0:0: Direct-Access Generic STORAGE DEVICE 9451 PQ: 0 ANSI: 0
br0: topology change detected, propagating
br0: port 2(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan1) entering forwarding state
device vlan2 entered promiscuous mode
sd 0:0:0:0: [sda] 1953792 512-byte hardware sectors (1000 MB)
device vlan2 left promiscuous mode
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 1953792 512-byte hardware sectors (1000 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
/dev/scsi/host0/bus0/target0/lun0: p1
sd 0:0:0:0: [sda] Attached SCSI removable disk
usb-storage: device scan complete
etherip: Ethernet over IPv4 tunneling driver
nf_conntrack_pptp: Unknown symbol nf_ct_gre_keymap_destroy
nf_conntrack_pptp: Unknown symbol nf_ct_gre_keymap_flush
nf_conntrack_pptp: Unknown symbol nf_ct_gre_keymap_add
nf_nat_pptp: Unknown symbol nf_nat_pptp_hook_exp_gre
nf_nat_pptp: Unknown symbol nf_nat_pptp_hook_inbound
nf_nat_pptp: Unknown symbol nf_nat_pptp_hook_outbound
nf_nat_pptp: Unknown symbol nf_nat_pptp_hook_expectfn
kjournald starting. Commit interval 5 seconds
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
EXT3 FS on sda1, internal journal
ext3_orphan_cleanup: deleting unreferenced inode 15297
EXT3-fs: sda1: 1 orphan inode deleted
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
Airlink101 AR670W uboot log
Baud rates of 57600
U-Boot 1.1.3 (Oct 3 2007 – 16:02:26) Build 001
Board: RT2880 DRAM: 32 MB
twe0 set to <NULL>
toe0 set to <NULL>
Set up sector start address BC400000
*** Warning – bad CRC, using default environment
============================================
ASIC -VerB/C (MAC to Phy Mode)
DRAM COMPONENT=128Mbits
DRAM BUS=32BIT
Total memory = 32Mbytes
Date:Oct 3 2007 Time:16:02:26
============================================
Eth0 (10/100-M)
Hit any key to stop autoboot: 0
## Booting image at bc440000 …
Image Name: 7zip Linux Kernel
Created: 1970-01-01 0:00:00 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: -1 Bytes = 4096 MB
Load Address: 8a000000
Entry Point: 8a000000
Uncompressing Kernel Image with LZMA … OK
Starting kernel …
LINUX started…
THIS IS ASIC
Linux version 2.6.23.17 (root@dd-wrt
) (gcc version 4.1.2) #3584 Sat Aug 7 09:25:26 CEST 2010
The CPU frequency set to 266 MHz
32M RAM Detected!
CPU revision is: 0001906c
Determined physical RAM map:
memory: 02000000 @ 08000000 (usable)
Wasting 1048576 bytes for tracking 32768 unused pages
Built 1 zonelists in Zone order. Total pages: 40640
Kernel command line: console=ttyS1,57600n8 root=/dev/mtdblock4 rootfstype=squashfs noinitrd
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 4-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
cause = 2080005c, status = 1000ff00
PID hash table entries: 1024 (order: 10, 4096 bytes)
calculating r4koff… 0028b0aa(2666666)
CPU frequency 266.67 MHz
Using 133.333 MHz high precision timer.
console [ttyS1] enabled
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 28032k/32768k available (2345k kernel code, 4672k reserved, 318k data, 124k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Generic PHY: Registered new driver
NET: Registered protocol family 2
Time: MIPS clocksource has been installed.
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
Load RT2880 Timer Module(Wdg/Soft)
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au
)
devfs: boot_options: 0x1
squashfs: version 3.0 (2006/03/15) Phillip Lougher
io scheduler noop registered
io scheduler deadline registered (default)
Ralink gpio driver initialized
Serial: 8250/16550 driver $Revision: 1.3 $ 2 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0xa0300500 (irq = 9) is a 16550A
serial8250: ttyS1 at I/O 0xa0300c00 (irq = 8) is a 16550A
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
MPPE/MPPC encryption/compression module registered
NET: Registered protocol family 24
PPPoL2TP kernel driver, V1.0
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com
>
ralink flash device: 0x400000 at 0xbf000000
Ralink SoC physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
found squashfs at 118000
Creating 6 MTD partitions on "Ralink SoC physically mapped flash":
0x00000000-0x00030000 : "uboot"
0x00030000-0x00040000 : "uboot-config"
0x00040000-0x00050000 : "factory-defaults"
0x00040000-0x003f0000 : "linux"
0x00118000-0x003f0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary — force read-only
0x003f0000-0x00400000 : "nvram"
u32 classifier
Actions configured
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
ctnetlink v0.93: registering with nfnetlink.
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
ip_tables: (C) 2000-2006 Netfilter Core Team
IPP2P v0.8.2 loading
ClusterIP Version 0.8 loaded successfully
TCP bic registered
TCP cubic registered
TCP westwood registered
TCP highspeed registered
TCP hybla registered
TCP htcp registered
TCP vegas registered
TCP scalable registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Welcome to PF_RING 3.2.1
(C) 2004-06 L.Deri <deri@ntop.org
>
NET: Registered protocol family 27
PF_RING: bucket length 128 bytes
PF_RING: ring slots 4096
PF_RING: sample rate 1 [1=no sampling]
PF_RING: capture TX No [RX only]
PF_RING: transparent mode Yes
PF_RING initialized correctly.
PF_RING: registered /proc/net/pf_ring/
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com
>
All bugs added by David S. Miller <davem@redhat.com
>
GDMA1_MAC_ADRH — : 0x00000000
GDMA1_MAC_ADRL — : 0x00000000
Ralink APSoC Ethernet Driver Initilization. v2.00 256 rx/tx descriptors allocated, mtu = 1500!
NAPI enable, weight = 0, Tx Ring = 256, Rx Ring = 256
GDMA1_MAC_ADRH — : 0x0000fb47
GDMA1_MAC_ADRL — : 0x9d6b785d
PROC INIT OK!
decode /dev/mtdblock4
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 124k freed
start service
starting Architecture code for rt2880
rt2860v2_ap: module license 'unspecified' taints kernel.
GDMA1_MAC_ADRH — : 0x0000001d
GDMA1_MAC_ADRL — : 0x6ab7aad3
phy_tx_ring = 0x09dbf000, tx_ring = 0xa9dbf000, size: 16 bytes
phy_rx_ring = 0x098c0000, rx_ring = 0xa98c0000, size: 16 bytes
GDMA1_FWD_CFG = 10000
Set: phy[29].reg[23] = 07c2
Set: phy[29].reg[22] = 8420
Set: phy[29].reg[24] = 0001
Set: phy[29].reg[25] = 0001
Set: phy[29].reg[26] = 0001
Set: phy[29].reg[27] = 0001
Set: phy[29].reg[28] = 0002
Set: phy[30].reg[9] = 1089
Set: phy[30].reg[1] = 2f00
Set: phy[30].reg[2] = 0030
br0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
device br0 entered promiscuous mode
Algorithmics/MIPS FPU Emulator v1.5
device vlan1 entered promiscuous mode
device eth2 entered promiscuous mode
sh: ead: not found
RtmpOSNetDevDetach(): RtmpOSNetDeviceDetach(), dev->name=ra0!
0x1300 = 00064380
0x1300 = 00064380
device ra0 entered promiscuous mode
br0: port 2(ra0) entering learning state
br0: port 1(vlan1) entering learning state
device br0 left promiscuous mode
device br0 entered promiscuous mode
device br0 left promiscuous mode
device br0 entered promiscuous mode
wland: No such file or directory
device vlan2 entered promiscuous mode
device vlan2 left promiscuous mode
Key is a RSA key
Wrote key to '/tmp/root/.ssh/ssh_host_rsa_key'
br0: topology change detected, propagating
br0: port 2(ra0) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan1) entering forwarding state
Key is a DSS key
Wrote key to '/tmp/root/.ssh/ssh_host_dss_key'
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
SIOCGIFFLAGS: No such device
etherip: Ethernet over IPv4 tunneling driver
My wifizoo
nmap使用技巧【持续更新】
1. nmap -sS -O scan 192.168.1.* -oN /mnt/nmap.txt 扫描192.168.1.*网段内所有在线电脑的开放端口以及操作系统类型。