3)原厂固件折腾samba:使用fiddler修改JS搞定NAT和DMZ到路由器本身(10.0.0.1),上联路由器局域网还是无法通过上联局域网IP(192.168.1.142)进行samba访问,PI安装无线网卡后,在10.0.0.x网段mount smb共享目录成功。
Then you will use a TFTP client:
Mac TFTP Client
Windows TFTP Client
In Windows you need to turn TFTP Client on by going to Program & Features, Turn windows features on or off, check TFTP Client and click OK button.
Linux you have to use Commands
Info can be found Here and Here
Server: 192.168.1.1
password: don't need to use one
file: firmware download here
DD-WRT Download WNDR3700v1
r16454
r16785
r17201
http://blog.jqian.net/post/14295026342/netgear-wndr3700
wndr3700刷dd-wrt固件
家里的netgear wndr3700已经平稳工作大半年了,但是最近突然很想把它刷到dd-wrt。主要是stock firmware虽然稳定,但是功能还是弱不少,实在不符合它高端无线路由器的定位。最近很想路由器有这俩功能,还是GFW惹的祸......
定时重启路由器,或者重新连接PPPoE,因为家里是使用ADSL,定时重启路由器可以重新获取新的IP。
安装openvpn,由于dd-wrt就是一个嵌入式linux,很容易配置。
在网络上搜了一遍,发觉刷dd-wrt还是很简单的,直接按照wiki来就可以了。不幸的是,虽然我明确按照步骤,但是第2步就出问题了。当页面的刷机进度到达100%之后,等待了2分钟----结果wireless灯没有闪烁,反而是power灯变黄了----继续过了10秒后,所有的LAN灯变黄闪烁,然后,WPS灯变绿闪烁,如此反复。
继续尝试了hard reset(就是持续按住RESET键,通电30秒,断电30秒,再通电30秒),依然没有什么反应。
设置电脑eth0为192.168.1.x,尝试ping路由器默认地址192.168.1.1,发觉会返回 ...ttl=64(truncated);但有时候会直接失败,此时发觉eth0地址又空了。所以,初步判断,路由器其实在不停的重启。
目前还不太清楚,为什么这么简单的刷机步骤会导致失败,猜测原因可能有两点:
由于我的路由器设置了自动更新固件,可能最新的stock firmware更新后,已经不能从web页面刷dd-wrt固件了。
在网上某处看到需要用IE浏览器刷固件,而我用的是linux系统和chrome浏览器,不过我觉得这不至于吧。
不过很凑巧,当天就有人给出了解答,才知道原来netgear路由器有个"Reset Flash"功能,可以让路由器进入recovery mode,此时就可以用tftp来刷机了(包括刷原厂固件)。
进入recovery mode的步骤是这样的:
关闭路由器
按住Reset键,打开路由器
直到power灯开始闪绿色,松开reset键(大约45秒)
现在就能开始刷机了,把电脑连上某个LAN口,设置eth0地址到192.168.1.2~192.168.1.254,比如:
sudo ifconfig eth0 192.168.1.2
此时,发觉已经可以ping通 192.168.1.1 了,运行tftp导入你要刷的固件:
$ tftp 192.168.1.1
tftp> binary
tftp> rexmt 1
tftp> timeout 60
tftp> put wndr3700-factory.img
Sent 7229569 bytes in 5.0 seconds
看到发送成功的消息后,等待片刻后,路由器开始重启----成功!
没有再需要hard reset,已经可以成功访问192.168.1.1看到dd-wrt的管理页面。
http://blog.sina.com.cn/s/blog_592060b501015654.html
Netgear WNDR3700刷DD-WRT--Samba乱码问题 (2012-07-28 11:23:08)转载▼
标签: 杂谈
Netgear WNDR3700刷DD-WRT真是太简单了。
1、下载(这里是WNDR3700 v2版),直接去DD-WRT的Router Database,输入3700,找到合适的文件下载。
wndr3700v2-factory.img 是国际版;
wndr3700v2-factory_NA.img 是北美版;我还真没搞清北美版和国际版有啥区别,反正我刷的是国际版。
2、直接利用Netgear的"路由器升级"选项就可以刷成DD-WRT了。(见下图)
3、由于WNDR3700的固件有16M之多,DD-WRT也就不像过去针对2M、4M固件的路由器做出不同的版本,这里就一次把所有功能全部搞定。简单截几个图,看看吧
VPN功能:
USB挂载功能:
FTP以及Samba(网上邻居)功能
下面简单说说,如何解决Samba乱码的问题:
DD-WRT的Samba乱码的原因其实很简单:就是/tmp/smb.conf中的unix charset设置不对,只要改成utf-8即可。再用
#smbd restart
重启samba服务即可。
但是由于每一次插拔USB,DD-WRT都会重新生成/tmp/smb.conf文件配置文件,因此每次都需要手动修改一下,比较麻烦。
另一个办法,就是把smb.conf文件直接粘贴到启用Use Custom Configuration后的文本框中,如下图。
我懒的写smb.conf配置文件,因此先把Use Custom Configuration禁用,这样系统会自动为你生成一个/tmp/smb.conf文件。用telnet或在ssh登录到路由器上,打开此文件,并且把内容复制下来,粘贴到启用Use Custom Configuration后的文本框中,再修改一下unix charset=utf-8即可。
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=45&t=18575
by Olaf_Ramge ? Sat Sep 29, 2012 9:39 am
Hi,
iwconfig works only with wep encryption.
If you use WPA/WPA2 then iwconfig will not work.
My /etc/network/interfaces looks just like this:
auto wlan0
iface wlan0 inet dhcp
wpa-ssid "secret-wiki-net"
wpa-psk "verysecret-wpa-psk"
I can shut wlan0 up/down with:
ifup wlan0
ifdown wlan0
I can look with:
root@raspberrypi:/etc/default# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11bgn ESSID:"secret-wifi-net"
Mode:Managed Frequency:2.472 GHz Access Point: 74:EA:3A:FD:07:6F
Bit Rate=52 Mb/s Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
Link Quality=35/70 Signal level=-75 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:9 Missed beacon:0
And get a dynamic ip with:
dhclient wlan0
http://www.raspberrypi-tutorials.co.uk/set-raspberry-pi-wireless-network/
Learn how to set up a wireless network using your Raspberry Pi and learn how to manage and use the various networking options that are available.
NOTE: ** These instructions can now be bypassed by using the following wireless instructions on this page.**
Plug in your wireless device into your Raspberry Pi or a USB hub. I prefer to plug my devices into a USB hub to save the Raspberry Pi from wear and tear.
Before we can use the wireless device, we must first find out the name of our device so we can find the necessary drivers. Enter the following command:
$ lsusb
This will list all the usb devices attached to our Raspberry Pi. You will be looking for something that resembles your wireless device. Search through the list of USB devices for a wireless adapter.
The result may differ depending on the devices you have attached.
Bus 001 Device 005: ID 0bda:8189 Realtek Semiconductor Corp. RTL8187B Wireless 802.11g Network adapter.
The key information listed above has been bolded. This ID is what we will be searching for when looking for the drivers needed to use the adapter.
Before we continue, you will need to update your package information. Be sure that you're network cable is plugged in as we need to get some udpates from Debian. Just enter:
$ apt-get update
When the updates have finished downloading, enter:
$ apt-cache search RTL818
Remember your device may be different, so you will be entering your device ID for your device. You may have noticed that I only entered RTL818 instead of the whole ID. This is because it didn't find the adapter when using the apt-cache command. You may need to shorten your description.
The result returned for my device was:
Firmware-realtek - Binary firmware for Realtek wired and wireless network adapters
Enter
$ sudo apt-get install firmware-realtek
After a few minutes of updating you will be back at your $ prompt. Enter the following command to see if your adapter is listed.
$ lsmod
You will see the same ID of your device listed.
Module Size Used by
rtl8187 44897 0
You can ignore the above details. All we need to know is that the ID of your device is mentioned when you typed lsmod.
Now we just need to create a configuration file for the wireless adapter. We are going to do this by create a file. Enter the following command:
$ sudo nano /etc/wpa.config
Now enter the following, save the file and exit back to the $ prompt
network={
ssid="YOUR_SSID"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="WPA-PASSWORD"
}
The last part of this configuration is to add a reference to the interfaces. Issue the command:
$ sudo nano /etc/network/interfaces
Add the following
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa.config
Save this file and exit.
The final stage of this process is to unplug your network cable as we want to test that the wireless device is actually working, so restart the network by entering:
$ sudo /etc/init.d/networking restart
--- footnote
Thanks to L.R for correcting the typo. You have been awarded 10 bonus points.
Thanks also to Paul for spotting the wpa.config typo