Port 6881: BitTorrent

Port 6881 (TCP/UDP) is used by BitTorrent. Start of the traditional 6881–6889 BitTorrent range (unofficial use).

6881Port
TCP/UDPProtocol
bittorrentIANA service name
File transferCategory

Port range

6881 is a registered port (range 1024–49151). Any user can bind to it; IANA records which service registered the number.

Security

Only open port 6881 to the hosts that need it. Prefer the encrypted variant of the protocol where one exists.

Open port 6881 in a firewall

ufw         sudo ufw allow 6881/tcp
            sudo ufw allow 6881/udp
iptables    sudo iptables -A INPUT -p tcp --dport 6881 -j ACCEPT
            sudo iptables -A INPUT -p udp --dport 6881 -j ACCEPT
firewalld   sudo firewall-cmd --permanent --add-port=6881/tcp
            sudo firewall-cmd --permanent --add-port=6881/udp
Windows     New-NetFirewallRule -DisplayName "BitTorrent 6881" -Direction Inbound -Protocol TCP -LocalPort 6881 -Action Allow

Check if port 6881 is open

nc -vz example.com 6881
Test-NetConnection example.com -Port 6881   # PowerShell
sudo ss -tulpn | grep ':6881 '   # what is listening locally (Linux)

Other file transfer ports

Frequently asked questions

What is port 6881 used for?
BitTorrent. Start of the traditional 6881–6889 BitTorrent range (unofficial use).
Is port 6881 TCP or UDP?
Both are assigned. Check which one your software actually listens on.