HTTPfy

Port 6881 (BitTorrent)

Traditional BitTorrent range start (6881-6889) and the DHT port of many clients; modern clients pick a random port.

Registered (user) port, 1024-49151 TCPUDP Peer-to-peer Meant to face the internet

What port 6881 is used for

Traditional BitTorrent range start (6881-6889) and the DHT port of many clients; modern clients pick a random port.

Security: should port 6881 be open?

Meant to face the internet. Opening it makes your IP visible to every peer in a swarm. On corporate networks, traffic here usually means P2P software.

IANA assignment

Port 6881 is in the registered range and has no IANA assignment. The usage above is unofficial but widespread.

Check what is listening on port 6881

Linux: is anything listening on TCP 6881?
sudo ss -tlnp 'sport = :6881'
Linux: UDP 6881
sudo ss -ulnp 'sport = :6881'
Linux / macOS: which process owns the port
sudo lsof -nP -i :6881
Older Linux / BSD (net-tools)
sudo netstat -tlnp | grep ':6881 '
Windows (Command Prompt)
netstat -ano | findstr :6881
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 6881 -State Listen | Select LocalAddress,OwningProcess

Test it from outside

From another machine
nc -vz -w 5 HOST 6881
From Windows
Test-NetConnection HOST -Port 6881
UDP probe (no reply does not prove it is closed)
nc -vzu -w 5 HOST 6881

Open port 6881 in the firewall

ufw
sudo ufw allow 6881/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 6881 -j ACCEPT
nftables
sudo nft add rule inet filter input tcp dport 6881 accept
Windows Firewall
New-NetFirewallRule -DisplayName 'Allow TCP 6881' -Direction Inbound -Protocol TCP -LocalPort 6881 -Action Allow
ufw
sudo ufw allow 6881/udp
iptables
sudo iptables -A INPUT -p udp --dport 6881 -j ACCEPT
nftables
sudo nft add rule inet filter input udp dport 6881 accept
Windows Firewall
New-NetFirewallRule -DisplayName 'Allow UDP 6881' -Direction Inbound -Protocol UDP -LocalPort 6881 -Action Allow

Related ports

All port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.