Last week I wanted to try out a Linux distro that interested me and found that the only way to download it for free was through bittorrent. Since the distro was going to be for my Windows PC, instead of my Powerbook, I went ahead and installed Azureus, which is a JAVA based client. Azureus uses smilies (happy face icons) to tell you if the file download is working or not, the point being is that all your downloads should show green smilie faces. However I was not getting the green smilie face. Under the Tools section, there is a Test option to test your NAT/Firewall to see if there is something wrong. If this fails, then it means you need to configure your router to let the specific port through.

For me, my home DSL connection is provided through a Cisco 678 ADSL modem, which in turn connectes to a Netgear wireless router that in turn services all the home networked machines. For some reason on Windows2003, the packets would never get through, you actually need to configure the Cisco 678 modem to pass on the packets from such and such port, in this case it passes them on to the Netgear router, and on the Netgear router you use the Port Forwarding feature to send the packets through to a specific machine on the local network.

Ironically, on Mac OS X, using a different client, this works fine without any modification to the Cisco 678.

To get the magic green smilie, I ended up doing this:

Cisco 678:

First telnet to the 678 router, you can use DOS or in Mac OS X, Terminal.

telnet: 10.0.0.1
(enter the password for the modem)
en
(enter on the password, usually there is none, is not enter it)
set nat entry add 10.0.0.2 80 tcp
set nat entry add 10.0.0.2 80 udp
write
reboot

I used the port 80 as an example, but depending on your application, you will probably need a different port. Most of the time you need to do both the TCP and UDP for the same port number. Once you enter on the reboot command, you lose connection with the router, so just close your window and open a new DOS or Terminal window.

To verify the changes log back into the 678 and type:

show nat

You should see the rules you added for the forwarding of your port. The next step is to configure the wireless router, in this case the Netgear.

Wireless Router (Netgear):

For this step you need to know the IP address of your computer on the local network. If you reread the commands for the Cisco 678, you should get the idea that you really have two networks, the network between your DSL modem and your wireless router, i.e. 10.0.0.1 and 10.0.02. The changes to the DSL modem make the packets go to the wireless router, and so we now need to tell the wireless router to forward the packets onto the actual computer. This is called Port Forwarding. There should be an option to do this on your router’s configuration screen.

Running IPCONFIG in Windows or using the Network Utility in Mac OS X, should give you the local ip address for your computer. Usually it is 192.xxx.xxx.xxx. You will then specify this address to forward both UDP and TCP ports for such and such port number(s).

Once you do this, the next thing is to reboot both the DSL modem and the wireless router, just to make sure things will work from now on.

Checking The Port:

Now start Azureus or whatever application you want to work, and see if it works. Azureus has the handly Test tool, so just run that and see what the results say. In fact you could use Azureus to test any port, just change the port number in the Test tool and run the test. But just in case you don’t want to install Azureus just for this, you can open up a browser and go to CanYouSeeMe.org and input your port number and it will tell you if the port is reachable and working. If it is still not working, then most likely you have a local software firewall that is blocking it. You will need to configure the Windows firewall, or Apple’s firewall, or any third party firewall you have to allow these ports to be opened.

At this point, it sounds like a lot of work, but eventually you will have it working and your smilie will be green.

More Information:

I actually changed from the Netgear router to the Linksys WRT54GS and have had less problems with the network.

PortForward.com lists instructions on how to forward ports for all kinds of different hardware routers and modems.

Spazmatic.net is the best online resource for all the Cisco ADSL modems like the 678 and 675.

Some More CBOS Commands:

Depending on your CBOS version you can do some of the following commands. Note that WebKeyDesign is not responsible for any problems you might incur on your hardware. This information is given as a benefit to other curious technicians and so you should know what you are doing before you do it!

This command maps all ports to 10.0.0.2, which for most people would be their wireless router:

set nat entry add 10.0.0.2

I really don’t recommend it as I prefer to have the Cisco 678 protect my local lan as much as possible.

Sometimes you may want to actually redo all you NAT entries, so for that occassion, you can use this command:

set nat entry del all