發新話題
打印

[認真] bitcomet

你要free up 個BT port (normally 6881 to 6889), 使可以通過 router firewall and the NAT.......

What ports does BitTorrent use? Will it work with a firewall/NAT?The quick summary: You need to forward your ports if you have NAT in order to get the fastest speeds.This is probably the most common thing that people fail to do whenusing BitTorrent. Read on for more details of what all this entails,and if it's something that you need to do.
Prior to version 3.2, BitTorrent by default uses ports in the range of 6881-6889. As of 3.2 and later, the range has been extended to 6881-6999.(These are all TCP ports, BitTorrent does not use UDP.) The clientstarts with the lowest port in the range and sequentially tries higherports until it can find one to which it can bind. This means that thefirst client you open will bind to 6881, the next to 6882, etc.Therefore, you only really need to open as many ports as simultaneousBitTorrent clients you would ever have open. For most people it'ssufficient to open 6881-6889.
The port range that BitTorrent uses is configurable, see the section on command line parameters, specifically the --minport and --maxport parameters.
The trackers to which BitTorrent must connect usually are on port 6969, so the client must have outbound access on this port. Some trackers are on other ports, however.
BitTorrent will usually work fine in a NAT (network addresstranslation) environment, since it can function with only outboundconnections. Such environments generally include all situations wheremultiple computers share one publicly-visible IP address, mostcommonly: computers on a home network sharing a cable or xDSLconnection. If you are unsure of whether you have NAT or not, then try this link which will try to determine if you are behind a NAT gateway.
However, you will get better speeds if you can acceptincoming connections as well. To do this you must use the "portforwarding" feature of whatever is performing the NAT/gateway task. Forexample, if you have a cable or DSL connection and arouter/switch/gateway/firewall, you will need to go into theconfiguration of this device and forward ports 6881-6889 to the localmachine that will be using BitTorrent. If your device makes it hard toenter a range of ports (if you must enter each one separately), thenyou can just do the first 10 or so ports, or however many simultaneousclients you plan to ever have open. If more than one person behind sucha gateway wishes to use BitTorrent, then each machine should use adifferent port range, and the gateway should be configured to forwardeach port range to the corresponding local machine.
If you have one of these broadband router/NAT devices (such as theLinksys BEFSR41, D-Link DI-701/704, Netgear RT311, SMC Barricade, 3ComHome Ethernet Gateway, etc.) you will usually need to enter the webconfiguration of the device. If you're not sure, try http://192.168.1.1 or sometimes http://192.168.0.1.If you can't figure it out, try the manual for the device -- they areoften on the manufacturer's web site in PDF form. You can also try theforums at places like Broadband Reports or Practically Networked. To see an example of what you're looking for, this is a link to the Linksys BEFSR41 manual. Look at page 55, under the section "Port Range Forwarding."
If you are using Microsoft's ICS (Internet Connection Sharing), this article on mapping ports might be useful.
If you are using a software firewall, then you must also enableincoming connections to be answered by the BitTorrent client program.Note that Windows XP includes a primitive firewall ("InternetConnection Firewall" or ICF) which you may have to configure forBitTorrent. Here are the directions for opening ports in the Windows XP firewall:
  • Open the 'Network Connections' folder (click Start, then Control Panel, then Network and Internet Connections, then Network Connections.)
  • Click the shared connection or the Internet connection that is protected by Internet Connection Firewall, and then, under Tasks, click Change settings of this connection.
  • On the Advanced tab, click Settings.
  • For each port you wish to forward, (i.e. 6881, 6882, ... 6889) do the following:
    • On the Services tab, click Add and enter all of the following information:
    • In Description of service, type an easily recognized name for the service, such as "BitTorrent".
    • In Name or IP address of the computer hosting this service on your network, enter 127.0.0.1 (this means "the local machine.")
    • In both External and Internal port number for this service, enter the port number, e.g. 6881.
    • Select TCP, then OK.
See this link or this link for more information about the XP firewall.
If you are running another type of software firewall (such as ZoneAlarm Pro, Norton Firewall, McAfee Firewall, BlackICE Defender, etc.),you may have to do something similar to allow inbound access on ports688x to the BitTorrent client (usually btdownloadgui.exe.)
For example, in Zone Alarm Pro, in the Program Listings, click on the program's name (btdownloadgui.exe) and then click the Optionsbutton and then enter the ports to use. If you're having troubleconnecting, you might try giving BitTorrent access to all ports.
To open ports in the Mac OS X firewall, do the following:
  • Open System Preferences.
  • Click Sharing.
  • Select the Firewall tab.
  • Click the New... button.
  • Click the popup menu in the dialog that appears, and choose Other....
  • In the Port Number, Range, or Series field, enter 6881-6999.
  • In the Name field, enter BitTorrent (or any other identifying string.)
  • Click OK.
Can I use a proxy server with BitTorrent?First, note that there are two types of connections that the BitTorrent program must make:
  • Outbound HTTP connections to the tracker, usually on port 6969.
  • Inbound and outbound connections to the peer machines, usually on port 6881 and up.
A web proxy can only be used for the first type of connection, sincethe second type is not HTTP. Theoretically, you could use the HTTP CONNECTcommand to tunnel them through an HTTP proxy, but this would requireadditional code support in the client. There is a possible workaroundfor this scenario, however; see the final point below.
That having been said, here is how to configure an HTTP proxy for the tracker connections:
  • If the proxy does not require authorization, the system-wide proxy configuration should work. For Windows, open the Control Panel select Internet Options, click on the Connections tab, select your connection and click Settings... (or Lan Settings... if you have a direct connection.) Make sure the Use a proxy server option is selected and enter the proxy's address and port.
  • If your proxy requires basic authorization, set the http_proxy environment variable to http://username:password@hostname:port, where username and password are your login and password, and hostname:portis the address and port of the proxy server. If you don't know how toset environment variables, there are instructions for Windows on this page by Mike Ravkine (krypt).
  • If your proxy requires NTLM authorization (a Microsoft-proprietaryscheme), you may have to use a third party program. Fortunately thereis a utility called NTLM Authorization Proxy Server.It is a program you run on your local machine that acts as a proxy foryour proxy. In other words, it takes the (unauthenticated) proxyrequests from the application (BitTorrent) and forwards them on to yourorganization's proxy, adding the necessary NTLM authorization. It iswritten in Python and available as source, so you must install Pythonon your computer before running it. Refer to the home page for more information.
  • If you are in a firewalled environment where NO outboundconnections are allowed except those through an HTTP proxy, you willhave difficulty using BitTorrent. One method which might work is asfollows: The desproxyprogram can serve as a SOCKS 4 or 5 server than tunnels requeststhrough the proxy server. Then use SocksCap to "socksify" (interceptthe network calls and redirect them to the SOCKS server) the BitTorrentprogram. See below for a few notes about SocksCap. Note: If you get this method to work, please report your steps and results so that I can improve this part of the FAQ. Thanks.

Ref: http://www.dessent.net/btfaq/#ports

[ 本帖最後由 jwlchan 於 20-11-2008 07:19 編輯 ]
井底之蛙, 啋你都傻!

TOP

發新話題