February 26, 2007 · General · Email This Post

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

By default, ubuntu is totally locked and will not allow any incoming connections. To fix this use the following command

sudo iptables -A INPUT -p tcp --dport 6881 -j ACCEPT

this is the port that the built in ubuntu bittorrent client uses.If you are using different port you need to enter instead of 6881.

If you want to lockdown your machine use the following command

sudo iptables -A INPUT -p tcp --dport 6881 -j DROP

  • Share/Save/Bookmark

Related Articles

4 Comments to “How to open bittorrent ports from the command line”

  1. Arup says:

    Hi,

    By default, all ports in ubuntu are open unless firewall has been activated, in my case, all my inbound ports for Ktorrent, aMule etc. work fine, I don’t have firewall activated and use a router.

  2. allen says:

    i had try the command above but the error msg come out

    Bad argument `–dport’
    Try `iptables -h’ or ‘iptables –help’ for more information.

  3. Curtis says:

    Kind of a funny coincidence but while I was looking over these commands I noticed that all errors result from [OPTIONS] which require a double-hyphen. When viewed on here they render as a dash or a long single line while the need to be two separate hyphens.

    Make sure you check for this when copying commands to avoid errors. Took me awhile to figure it out :)

  4. James says:

    Hullo,
    I did what the instructions said and it only limited my down/up speed. But as soon as I dropped the port my down/up increased.

Leave a Reply