Port 135 is the Windows RPC endpoint mapper. Windows services such as WMI, DCOM and Active Directory replication use it to find the dynamic ports their RPC interfaces listen on. It should not be reachable from the public internet.
- Port
- 135
- Protocol
- TCP
- Service
- Microsoft RPC endpoint mapper
- Expose to internet?
- No
- Also used by
- DCOM, WMI, Active Directory, Exchange
Is port 135 safe to open?
Port 135 is open on almost every Windows machine and is meant for internal networks only. Reaching it lets an attacker enumerate RPC services and, with credentials, run commands remotely through WMI or DCOM. Several historic Windows worms spread through it.
How to secure Microsoft RPC endpoint mapper
- Block TCP 135 and the dynamic RPC range (49152–65535 on modern Windows) at the internet edge.
- Use Windows Firewall profiles so it is only allowed on the Domain profile.
- For remote administration across the internet, use a VPN rather than exposing RPC.
Check if port 135 is open
Linux: what is listening on this port
sudo ss -tlpn | grep ':135 'Windows (PowerShell): what is listening
Get-NetTCPConnection -LocalPort 135 -State Listen | Select-Object LocalAddress, OwningProcess, @{n='Process';e={(Get-Process -Id $_.OwningProcess).Name}}From another machine: is it reachable
nc -zv HOST 135
# or
nmap -p 135 HOST
# Windows
Test-NetConnection HOST -Port 135Restrict port 135 in the firewall
Replace 10.0.0.0/8 with the network or address that needs access. Docker publishes container ports through its own iptables rules, which bypass ufw; bind published ports to 127.0.0.1 (-p 127.0.0.1:135:135) instead of relying on the host firewall.
ufw: allow only your private network, deny everyone else
sudo ufw allow from 10.0.0.0/8 to any port 135 proto tcp
sudo ufw deny 135/tcpfirewalld: allow one source network only
sudo firewall-cmd --permanent --remove-port=135/tcp
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.0.0/8" port port="135" protocol="tcp" accept'
sudo firewall-cmd --reloadiptables
sudo iptables -A INPUT -p tcp --dport 135 -s 10.0.0.0/8 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 135 -j DROPWindows Firewall (PowerShell, as Administrator)
New-NetFirewallRule -DisplayName "Block 135 from internet" -Direction Inbound -Protocol TCP -LocalPort 135 -RemoteAddress Internet -Action BlockMonitor port 135
Run a TCP port monitor against your public IP on port 135: here, a failed connection is the healthy result, so you know the firewall is still doing its job. On Linux, the Statance agent also reports every listening port on the server. TCP port monitoring.
Related ports
| Port 139 | NetBIOS Session Service (SMB over NetBIOS) | High risk |
| Port 445 | SMB | Critical risk |
| Port 3389 | Remote Desktop (RDP) | High risk |
FAQ
Can I close port 135 on Windows?
You should block it from the internet, but do not disable the RPC service itself. Windows depends on it, and domain-joined machines need it on the internal network.
What is port 135 used for?
Port 135 is the Windows RPC endpoint mapper. Windows services such as WMI, DCOM and Active Directory replication use it to find the dynamic ports their RPC interfaces listen on. It is also used by DCOM, WMI, Active Directory, Exchange.
Is it safe to open port 135?
Not to the public internet. Port 135 is open on almost every Windows machine and is meant for internal networks only. Reaching it lets an attacker enumerate RPC services and, with credentials, run commands remotely through WMI or DCOM. Several historic Windows worms spread through it.
Is port 135 TCP or UDP?
Microsoft RPC endpoint mapper uses TCP on port 135.
How do I check if port 135 is open?
On the server, run sudo ss -tulpn | grep ':135 ' (Linux) or Get-NetTCPConnection -LocalPort 135 (Windows) to see what is listening. From another machine, run nc -zv HOST 135 or Test-NetConnection HOST -Port 135.
Know the moment a port stops answering.
TCP, HTTP, DNS and SSL checks from six regions, plus server metrics from a one-line agent.