Azureus and Ubuntu
Tuesday, January 16, 2007
I am quite a fan of torrents, and Azureus has been my top choice as a BitTorrent client for a while. However, when I switched my OS to Ubuntu, I started having problems with NAT. Turns out, this is quite typical for Ubuntu users. This is because all ports are locked by default under Ubuntu. So, I decided to throw together a guide to resolving all your NAT errors. These instructions come mainly from the Azureus wiki, but I thought I'd make them available here.
Reference:
Azureus Wiki: NAT Problem
Azureus Wiki: Router configuration
UPDATE: This will most likely NOT work on computers with a dynamic IP! I'll see about writing something on how to configure a static IP.
- To start with, we need to open a port that Azureus can use. To do this, issue the following commands:
iptables -I INPUT -p tcp --dport < your_port_number > -j ACCEPT
iptables -I INPUT -p udp --dport < your_port_number > -j ACCEPT
Replace the your_port_number with a number between 49125-65535. - Next, we must apply these changes. Create a new file called "iptables_azureus":
sudo gedit /etc/init.d/iptables_azureus
Insert the following into the new file:(sleep 220
/sbin/iptables -I INPUT -p tcp --dport-j ACCEPT
/sbin/iptables -I INPUT -p udp --dport-j ACCEPT ) & - Next, we must make the new file executable:
chmod +x /etc/init.d/iptables_azureus
- Now, we can link this into the startup sequence:
update-rc.d iptables_azureus start 51 S .
- Enter your routers IP address into the address field of your router. For most, this will be http://192.168.1.1/ . Enter your username and password.
- Click on the tab "Applications and Gaming." Here, we can configure the router to open the port (chosen above) to Azureus, and other Bittorent apps pointed at that port.
- Under "Application Name" enter something like "Bittorent." What you name it doesn't matter! This is only for reference.
- Next, enter a port range which contains the port you selected above. In my case, I simply used the range 49125-65535. You may want to enter a smaller range.
- Under protocol, make sure "TCP" is selected.
- Enter the last digits of your IP. This can be found out by running ifconfig as root:
sudo ifconfig
Look at the IP given, and take the digits behind the last decimal (.). - Be sure to have the "Enable" box checked.
- Choose "Save Settings"
Reference:
Azureus Wiki: NAT Problem
Azureus Wiki: Router configuration
UPDATE: This will most likely NOT work on computers with a dynamic IP! I'll see about writing something on how to configure a static IP.
4
Comments:
Thanx man !!!!
It worked....
:)
It worked....
:)
Excellent!
As for computers that are behind a router and on DHCP, usually you can setup the router to give a certain MAC address the same local IP address... at least that is what I did.
You should put the UPDATE warning a little lower, then i wouldnt have seen it at all...
commented by Unknown, 11:24 PM