HTTPfy

Port 548 (AFP)

Apple Filing Protocol for Mac file sharing and old Time Machine targets; deprecated in favour of SMB.

Well-known (system) port, 0-1023 TCP File transfer and storage Do not expose to the internet

What port 548 is used for

Apple Filing Protocol for Mac file sharing and old Time Machine targets; deprecated in favour of SMB.

Security: should port 548 be open?

Do not expose to the internet. LAN only. Use SMB for new setups.

IANA assignment

Service nameProtoDescriptionAssigneeReference
afpovertcp TCP AFP over TCP
Defined TXT keys: u=<username> p=<password> path=<path>
Leland Wallace -
afpovertcp UDP AFP over TCP
Defined TXT keys: u=<username> p=<password> path=<path>
Leland Wallace -

Check what is listening on port 548

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

Test it from outside

From another machine
nc -vz -w 5 HOST 548
From Windows
Test-NetConnection HOST -Port 548

Block port 548 in the firewall

ufw
sudo ufw deny 548/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 548 -j DROP
nftables
sudo nft add rule inet filter input tcp dport 548 drop
Windows Firewall
New-NetFirewallRule -DisplayName 'Block TCP 548' -Direction Inbound -Protocol TCP -LocalPort 548 -Action Block

Related ports

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