Networking-Blog

My WordPress Blog

Linksys WRT54GL UseMyNet

WiFi

Many Internet Cafe businesses want to offer WiFi access for customers with laptops.
Here the client-server software is not suitable as it is impractical to install the client software on each
customers laptop. In these circumstances the solution is to use  “captive portal” software.
This software runs on a PC or WiFi router and can intercept the traffic from the laptop and redirect it to
a “landing page” where the customer is asked for payment or authentication
.

Typically the software works as follows:

1.  Customer connects to the WiFi network of the Internet Cafe.
2. Customer launches web browser and enters desired site (for example www.indiatimes.com).
3. Customer is redirected to the “landing page” instead of the desired site.
4. Customer is prompted for and enters access code.
5. Customer’s laptop is authenticated for the session time.
6. Customer’s web browser is redirect to desired site (for example www.indiatimes.com).

Inter LAN connectivity is disabled. Host on the Lan will not be allowed to connect to another
host on the Lan. Is is the security measure in place since these devices using UseMyNet software
are more likely to be used in public places
. Data Protection is enforced here.

In order to allow internal Lan Connectivity :

Traffic to local networks are blocked by default as most customers require this.
You can edit the file
/etc/init.d/umn and remove any or all of the following 3 lines

iptables -A FORWARD -i $LAN -d 10.0.0.0/8 -J REJECT –reject-with icmp-host-prohibited
iptables -A FORWARD -i $LAN -d 172.16.0.0/12 -J REJECT –reject-with icmp-host-prohibited
iptables -A FORWARD -i $LAN -d 192.168.0.0/16 -J REJECT –reject-with icmp-host-prohibited

Linksys WRT54GL Router – Recover from a bad flash

Before you continue below, make sure you’ve first tried a hard reset to revive your router:

1.  Disconnect the router from UTP cables (not the power cable).
2. Push reset button for 30 secs.
3. Without releasing reset button, disconnect power cord.
4. Hold the reset button for another 30 secs.
5. Replug the power cord.
6. Still hold the reset button for another 30 secs.
7. Release the reset button and give the router about 10 secs to resettle.
8. Disconnect power cord for another 10 secs and then reconnect.
9. All should be in default settings now.

This procedure is usually called 30/30/30 reset.
If the power light blinks in a neverending way, the 30/30/30 reset has no effect
.

Seize The Moment With TFTP :

You can use the TFTP  (Trivial File Transfer Protocol (define) command-line utility to
upload fresh firmware to the router in its brief moment of wakefulness.
Windows, OS X and Linux all include TFTP clients.

First, you need a .bin file containing the known good firmware. You can visit the Linksys
site as described above and download the .zip version of the firmware,
which includes the .bin file.

You can even use a .bin file for an open source firmware, so long as you choose
one that’s stable and tested and is the correct version for your router
(or else you start this whole process all over again).

Windows users need some dexterity here. First, remove power from your router.

Open two command prompt windows. In one, you will set up your TFTP command.

Type (but do not yet press enter) :

tftp –i 192.168.1.1 PUT firmwarefile.bin

In the second command prompt, enter:

ping –t 192.168.1.1

Run the ping command, which will begin probing and failing to reach the router.
Now change window focus to your
TFTP command.

Apply power to the router. Watch the ping window for a response,
Then hit enter in the TFTP window !

Miss by a beat and you’re too late – the pings will fail and your moment has passed.
Cut power to the router and repeat the process.
You need to start the TFTP the moment you see a successful ping.

For OS X and Linux users, the principle is the same, but the process is easier.
First, remove power from your router. Open a terminal window and enter

the commands:

tftp 192.168.1.1
binary
rexmt 1
timeout 60
trace
tftp> put firmwarefile.bin

Now apply power to your router. The tftp client will continuously retry uploading the firmware
until the router responds. Hopefully, the router will briefly awaken, allowing the firmware upgrade
to be sent. About two minutes later, the router will reset and become operational with the new firmware.

Notes :

Enabling boot_wait

The router does not boot directly into the firmware, instead it boots into a program
known as a bootloader which is responsible for initializing the hardware and loading
the firmware. If the boot_wait variable is set, the bootup process is delayed by few
seconds allowing a new firmware to be installed through the bootloader using tftp.

Recommend that you use boot_wait for your first install. This will confirm boot_wait
is correctly enabled and provide a firmware recovery experience without the stress of
a broken router
.