Is port 1521 (the Oracle database listener) exposed to the internet?
Port 1521 is the port Oracle's database listener uses by long-standing convention — IANA's own registry lists it under a different, older assignment. An internet-reachable listener answers an unauthenticated caller before any credential is checked, confirming that an Oracle database is there. AdminKit's port-check tool automates nine common exposure checks today; here's how to check 1521 yourself.
By AdminKit team, Netbase JSC · Updated
Key takeaways
- 1521 is Oracle’s listener port by convention only. IANA lists it as
ncube-lmand notes known unauthorized use; the ports IANA lists for Oracle are 2483 and 2484. - The listener answers before any login. From outside, anyone can confirm it is Oracle and guess service names, because a wrong name and a right one produce different errors.
- Remote administration of the listener has been local-only by default since 11g Release 2. Remote service registration, the route behind the 2012 “TNS Poison” flaw, is limited to local addresses by default in 19c.
tnspingand a deliberately failingsqlpluslogin from outside show what the listener gives away;lsnrctl statuson the host shows what it is bound to.- Fix it with a firewall first, then valid node checking in
sqlnet.ora, restricted registration and control transports, and Oracle’s quarterly patches.
Why does port 1521 mean “Oracle” when IANA says otherwise?
Oracle’s database listener has shipped configured to port 1521 since early versions of the product, and that convention stuck so thoroughly that it’s now the de facto industry standard — every DBA and every scanning tool treats 1521 as “Oracle.” IANA’s Service Name and Port Number Registry tells a different story: it lists port 1521 under ncube-lm, the nCube License Manager, a formal assignment that was never handed over once Oracle’s convention became dominant. The current entry carries a note that unauthorized use of port 1521 is known. Nothing about that mismatch changes how real the exposure is — it’s a reminder that “the standard port for X” and “IANA’s registry entry for that number” are two separate facts, and for several widely used services they’ve quietly diverged.
| Port | IANA entry | How Oracle deployments use it |
|---|---|---|
| 1521 | ncube-lm, nCube License Manager | The listener’s default TCP port |
| 2483 | ttc, Oracle TTC | Registered for Oracle’s client protocol; rarely the default |
| 2484 | ttc-ssl, Oracle TTC SSL | Registered for the TLS version of the same protocol |
| Site-chosen, often 1522 | None | TCPS endpoints; Oracle’s own listener.ora examples use 1522 |
Oracle’s 11g Release 2 listener documentation also explains why so many listeners end up on 1521 without anyone choosing it: a listener with no configuration file is named LISTENER, supports no services at startup, and listens on TCP port 1521 at the host’s name. That host-name address is often the server’s main network interface, not loopback.
What does the listener reveal before anyone logs in?
The listener’s only job is to accept an incoming connection and route it to the correct database service, which it does before any username or password is checked. That design means a caller who can reach the port gets answers to two questions for free.
The first is whether an Oracle listener is there at all: it replies in Oracle’s own network protocol, and tnsping reports success against it. The second is whether a given service name exists. A connection request for an unknown name is refused with ORA-12514, “service is not registered with the listener”, or ORA-12505 for an unknown SID. A request for a real name is handed to the database, which then asks for credentials and answers a bad login with ORA-01017. Service names are often guessable, such as ORCL, XE or a company abbreviation, so an outsider can work through a list until the error changes, and then start guessing passwords against that service.
The listener’s administrative commands, such as status and services, are a different matter on current releases. By default the listener permits only local administration, and a remote caller who tries one gets TNS-01190, “the user is not authorized to execute the requested listener command”. Listeners on old releases, or ones where that restriction was relaxed, can still hand over their service list and version to anyone who asks, which is one more reason to test from outside rather than assume.
What has gone wrong with exposed listeners before?
The best-documented listener flaw is CVE-2012-1675, disclosed as the “TNS Listener Poison Attack”. NVD describes how a remote attacker could register a database instance or service name that already existed with the listener, then sit in the middle of connections meant for the real database and run commands through them. Oracle’s security alert lists affected releases in 10g Release 2, 11g Release 1 and 11g Release 2, and states the flaw may be exploited over a network without a username or password.
The defence Oracle pointed customers to is controlling who may register services. On 19c the listener.ora reference documents VALID_NODE_CHECKING_REGISTRATION (with the listener name appended to the parameter name) with a default of on, which allows registration only from local IP addresses. The same reference documents the “class of secure transports” parameters: SECURE_REGISTER_listener_name limits registration to named transports such as IPC or TCPS, and SECURE_CONTROL_listener_name does the same for control commands. A listener carried forward from an old release, or one where valid node checking was switched off so a remote cluster node could register, may not have these protections.
Beyond the listener, the database behind it is patched through Oracle’s quarterly Critical Patch Updates. A reachable listener tells an outsider that there is a database worth checking against those advisories, so a port that stays open makes patch timing matter more.
Why has Oracle moved away from listener passwords?
Oracle’s Net Services documentation is direct about this: “In Oracle Database 11g Release 2 (11.2), the password feature is being deprecated. This does not cause a loss of security because authentication is enforced through local operating system authentication.” By default, the listener “permits only local administration for security reasons,” enforced so that only the operating-system user who started the listener can administer it — Oracle’s own recommendation is to keep that default and reach the server through a secure remote login rather than configuring a listener password sent over the network. That default is about administering the listener, not about who can connect through it to reach a database instance, which is why network exposure of the port itself is still the question worth answering first.
How do you check your own exposure?
AdminKit’s port-check tool automates reachability checks for a fixed set of nine commonly-misconfigured ports, and 1521 isn’t on that list. It also tests only the public address your browser is connecting from, so it covers your own office or home connection, not a database host in a data centre. Confirm your current public IP with what is my IP, then test the port manually from a machine outside your network:
nc -vz -w 3 203.0.113.5 1521
A successful connection means the listener is reachable from the internet; “connection refused” or a timeout means it’s closed or filtered at your perimeter. Run this only against a host you own or are authorized to test.
With Oracle client tools installed on the outside machine, two more tests show what the listener tells a stranger. The service name NOSUCHSERVICE is deliberately wrong:
$ tnsping 203.0.113.5:1521
$ sqlplus -L probe/wrong@//203.0.113.5:1521/NOSUCHSERVICE
Example results (illustrative; documentation address):
| Result | What it means |
|---|---|
tnsping ends with OK (20 msec) | An Oracle listener answers from the internet. |
ORA-12514 or ORA-12505 from sqlplus | The listener is processing connection requests from outside, so service names can be guessed. |
ORA-01017 when you use your real service name | The database login is reachable from the internet and open to password guessing. |
TNS-12535 / timeout, or TNS-12541 / no listener | Nothing reachable on 1521 from where you tested. |
How do you confirm the listener on your own host?
On the database server, as the operating-system user that runs the listener, check which addresses it is bound to and which services it carries:
$ ss -ltnp | grep 1521
LISTEN 0 128 0.0.0.0:1521 0.0.0.0:* users:(("tnslsnr",pid=2214,fd=8))
$ lsnrctl status
...
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db01.example.com)(PORT=1521)))
Services Summary...
Both blocks are examples. In the ss output, 0.0.0.0 or [::] means every interface. In lsnrctl status, check whether the HOST in each endpoint resolves to a private address or a public one, and whether any TCPS endpoint is listed alongside the plain TCP one.
How do you fix an exposed Oracle listener?
- Firewall port 1521 so only the application servers that actually need a database connection can reach it — most deployments never need the listener open to the public internet.
- Confirm the listener isn’t bound to every network interface, since that’s what turns an internal-only service into one reachable from outside.
- Turn on valid node checking in
sqlnet.ora, so the listener itself refuses connections from addresses that are not on an invited list. - Keep
VALID_NODE_CHECKING_REGISTRATIONat its default ofon, and limit registration and control to local or TLS transports withSECURE_REGISTERandSECURE_CONTROL. - Keep listener administration restricted to the local operating-system user who started it, Oracle’s own default since Database 11g Release 2, rather than configuring the deprecated network-transmitted password, and reach the host through a secure remote login when you need to administer it.
- Treat a reachable listener as having confirmed your database to anyone who looked, and apply Oracle’s quarterly patches promptly.
Valid node checking is documented in the sqlnet.ora reference: with TCP.VALIDNODE_CHECKING=yes, only clients matching TCP.INVITED_NODES may connect, and that list takes precedence over TCP.EXCLUDED_NODES. A minimal pair of files for one application subnet:
# sqlnet.ora
TCP.VALIDNODE_CHECKING = yes
TCP.INVITED_NODES = (10.0.2.0/24, db01.example.com)
# listener.ora
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST = 10.0.2.40)(PORT = 1521))
(ADDRESS = (PROTOCOL = ipc)(KEY = EXTPROC1521)))
SECURE_REGISTER_LISTENER = (IPC)
If anything on the database host itself connects over TCP, add the host’s own addresses to the invited list as well.
Does the same question apply to every database port?
Oracle joins a pattern AdminKit already covers for other exposed database ports — see is port 3306 (MySQL) exposed, is port 5432 (PostgreSQL) exposed and is port 27017 (MongoDB) exposed — in every case, the fix follows the same pattern: restrict network access first, and never assume a service is private just because nobody deliberately opened its port. These database-listener checks sit alongside the broader protocol and device exposure guides in AdminKit’s machine protocols cluster.
Which servers may you test with these checks?
Every check this page links to is for assets you own or are explicitly authorized to test. Never scan, probe, or attempt to connect to a network or device you don’t control — AdminKit’s active checks only ever run against the IP making the request or an asset you’ve verified ownership of. See our Disclaimer and Acceptable Use Policy for the full terms.
This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.
Frequently asked questions
Is port 1521 officially assigned to Oracle?
No. IANA's Service Name and Port Number Registry lists 1521 (both TCP and UDP) as ncube-lm, nCube's license manager — not Oracle — and its entry notes that unauthorized use of the port is known. Oracle's database listener has used 1521 as its de facto default for so long that it's treated as the standard across the industry, but it was never a formal IANA assignment to Oracle itself. The ports IANA does list for Oracle are 2483 and 2484.
What can someone do with just network access to an exposed listener, before any login?
The listener's job is to accept a connection and route it to the right database service. Anyone who can reach it can confirm that an Oracle listener is there and try service names one at a time: an unknown name gets an ORA-12514 or ORA-12505 error, while a correct one moves on to the login prompt. On current releases, remote administrative commands such as status are refused by default, but older or reconfigured listeners can say more.
Does AdminKit's port-check tool scan port 1521?
No. The tool checks a fixed list of nine specific TCP ports (23, 554, 1883, 8883, 502, 7547, 80, 443, 8080) chosen for how often they turn up misconfigured on home and small-office devices — see the port-check tool page for the current list. 1521 isn't on that list, so confirm your own exposure with the manual check below.
Does Oracle recommend a listener password?
No, not anymore. Oracle's own Net Services documentation states that the password feature was deprecated starting in Database 11g Release 2, in favor of restricting administration to the local operating-system user who started the listener by default — Oracle's documented guidance is to keep that default and reach the listener for administration through a secure remote login, not a network-transmitted password.
What's the fastest fix if port 1521 answers from outside my network?
Firewall the port to only the application servers that actually need a database connection, and confirm the listener isn't bound to every interface by default — most Oracle deployments only need 1521 reachable from an internal application tier, never directly from the public internet. Then turn on valid node checking in sqlnet.ora so the listener itself refuses unknown clients.
Sources
- Oracle Database 11g Release 2 — Configuring and Administering Oracle Net Listener
- Oracle Database 19c Net Services Reference — Oracle Net Listener parameters (listener.ora)
- Oracle Database 19c Net Services Reference — Parameters for the sqlnet.ora file
- Oracle Security Alert for CVE-2012-1675 (TNS Listener Poison Attack)
- NVD — CVE-2012-1675
- Oracle — Critical Patch Updates, Security Alerts and Bulletins
- Oracle Database error help — ORA-12514
- Oracle Database error help — TNS-01190
- IANA Service Name and Port Number Registry
Want AdminKit to watch this for you?
Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.
Talk to an expert
Huy Nguyen (David), Founder & CEO, Netbase JSC
Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.