Tuesday, December 31, 2013

setup openwrt on Asus rt-n15 as wireless client with relayed(Pseudo-bridge)

openwrt on asus rt-n15(Attitude Adjustment 12.09|Load:0.26 0.08 0.06)
  • rt-n15
Flash from a Windows PC using the Firmware Restoration utility. (Download and install the Firmware Restoration Utility to your PC.)
The Asus RT-N15 has a failover mode, (refer to rt-n16)http://wiki.openwrt.org/toh/asus/rt-n16
To launch the recovery mode disconnect power from the router first.
Hold the WPS button while replugged the power to the router to reset nvram, router will restart 2x. Hold the RESET button while replugged the power to the router to get into recovery mode : tftpd is listening. The power LED should start to blink (low frequency, ~1 time every 3 seconds). Retry if that won't work for you.
The router IP in the recovery mode is 192.168.1.1 255.255.255.0.
Configure your PC (don't use 192.168.1.1)
netsh interface ip set address name="Local Area Connection" static 192.168.1.2 255.255.255.0
Ping 192.168.1.1 should give a response.
Launch the Firmware Restoration utility, select the firmware and press the Upload button.
Ignore the warning, we wanna be on OpenWRT!
telnet to 192.168.1.1 and login as root, there is no password, type in passwd to set a password for root.
login in to web interface and assign a DNS server to the Lan interface.
close telnet and use ssh to login 192.168.1.1
login in to web interface and assign a DNS server to the lan interface.

root@OpenWrt:~# opkg update
root@OpenWrt:~# opkg install relayd
root@OpenWrt:~# opkg install luci-proto-relay

root@OpenWrt:~# /etc/init.d/relayd enable

  • use luci to config routed client relayed.
Basically.
  1.  enable 802.11 bgn(radio0) and scan wireless network.
  2. join the wireless network and it will ask for passcode, name of the new network(wwan by default) and create/assign firewall zone(select "lan" here)
  3. create a new network interface (" "stabridge"), select relayed bridge and select connect lan and wwan.
  4. network firewall under zones, change the forwarding for and lan and wwan to "accept"
 

openwrt on tp-link wdr4300

the openwrt was installed and configured as routed client relayed, and I need to reset the openwrt to factory default to use it as a WAP, here are the steps

  1. Power the router up;
  2. After powering up track the SYS light when it starts to blink, when it does press and hold the WPS/reset button till SYS lights starts to blink faster – router goes to recovery mode;
  3. Telnet to the router on 192.168.1.1 – no password needed (if your computer doesn’t gets IP address from DHCP assign it manually for i.e. 192.168.1.200 with netmask of 255.255.255.0);
  4. In telnet terminal type `mtd -r erase rootfs_data` to reset OpenWRT to it’s defaults. then the router will reboot.
  5. after reboot, telnet in and passwd to set a password.
  6. use PUTTY to ssh to 192.168.1.1 with username root and the password.