Port 1521: Oracle DB
TCP 1521 is the port for Oracle Database listener (TNS). Never on the internet.
| Service | Oracle Database listener (TNS) |
|---|---|
| Protocol | TCP |
| Exposure risk | High: do not expose to the internet |
| Range | Registered (1024–49151) |
What port 1521 does
Clients connect to Oracle databases through the TNS listener on 1521.
Should port 1521 be open?
Never on the internet.
Find what's listening on port 1521
- Linux:
sudo ss -tulpn | grep :1521 - macOS:
sudo lsof -nP -i :1521 - Windows:
netstat -ano | findstr :1521, then look up the PID in Task Manager.
Open or block it in a firewall
- ufw:
sudo ufw allow 1521/tcp(ordeny) - firewalld:
sudo firewall-cmd --add-port=1521/tcp --permanent && sudo firewall-cmd --reload - Windows:
New-NetFirewallRule -DisplayName "Port 1521" -Direction Inbound -Protocol TCP -LocalPort 1521 -Action Allow
Port assignment per the IANA Service Name and Transport Protocol Port Number Registry. Test several ports at once with the port scanner, or any port with the open port checker.
Questions about port 1521
What is port 1521 used for?
Oracle Database listener (TNS). Clients connect to Oracle databases through the TNS listener on 1521.
Is port 1521 TCP or UDP?
TCP. Oracle DB uses TCP port 1521.
Is it safe to open port 1521?
High: do not expose to the internet. Never on the internet.
How do I check if port 1521 is open?
Use the checker on this page: it connects to your host on TCP 1521 from the internet. Locally, run
nc -vz host 1521 (macOS/Linux) or Test-NetConnection host -Port 1521 (PowerShell). To see what is listening on your own machine, run ss -tulpn | grep :1521 (Linux) or netstat -ano | findstr :1521 (Windows).