Saturday, July 11, 2009

Remove Non Empty Directory

We cannot use rmdir as per traditional methods, we need to use RM with the option -rf

rm -rf /htdocs/www/dirname

Thursday, July 9, 2009

Setting up two linksys router to expand range

By default, most of the linksys router do not support repeater/bridging. But luckily the folks at DD-WRT created a router firmware so that we can use our traditional router as a repeater so that we can expand the range of our networks.

You can obtain the .bin firmware from:
http://www.dd-wrt.com/

I got into the directory v24-sp1. From which select your router. Mine is linksys and version of your router can normally be obtained from the label on your router. In which case mine is 1.1, before you proceed further, do check the 'supported hardware' page to ensure that you can actually flash your firmware of your router. If your hardware is not supported then you should not attempt to even flash it.

Get a RJ45/Ethernet cable, armed with the Firmware and you are good to go.

FIRST PART
------------------------------------------------------------------
On the end of the second router (this is not the REPEATER)
1. Plug your RJ45 cable from your computer (with the firmware) to the router
2. Login http://192.168.1.1/ with username: linksys and password admin (if your router is linksys)
3. If you can't login, that means you forgot your password and username then you can always hard reset your router by holding and pressing the small button behind your router to reset it.
4. Inside the page after you login, click on firmware. And update the firmware by locating the .bin file you downloaded earlier.
5. Make sure you do this via a cable and not through WIFI so that the probability of failure is greatly reduced. Afterwhich if you see "successful". Congratulations, you are done with the first part of installing the firmware.

SECOND PART (on your computer which is connect to the REPEATER via RJ45)
--------------------------------------------------------------------
1. Login to the repeater (the router with the new firmware)
2. The login should now be: username: root, password: admin
3. Leave DHCP Server settings to be 'on' and modify the TCP settings to become 10.0.0.1 instead of 192.168.1.1 ( this is to avoid conflict with the main router)
4. You should then not be able to connect to your page via 192.168.1.1 anymore. Modify the TCP/IP Settings for your computer. Set the TCP/IP settings from automatic to become the following:
IP: 10.0.0.2
SUBNET: 255.255.255.0
GATEWAY: 10.0.0.1
5. Login again to http://10.0.0.1/
6. Disabel Sp1 Firewall
7. Click on the status main Tab and search for the home network under the wireless tab and join the network
8. Inside the Wireless main tab -> basic settings, Add virtual interface
9. The SSID of this virtual interface should be different from your main SSID.
10. Wireless Security for both the virtual interface and the main interface (on your repeater) should be the same as your real router's. In my case, I set the Wireless security for both virtual/main interface to be WEP.

Now to test everything, take off all wires. Connect using Wireless from your laptop. Without any wires connecting to the repeater. You should be able to see the broadcast of your repeater's SSID. If you can see it but can't connect to the internet, try removing all security settings and work backwards from there, 99% of the time, its the security settings in conflict.

Aaron