Port 1521 (Oracle Database)

Port 1521 is registered by IANA for the ncube-lm service (nCube License Manager), but on database servers it is best known as the default port of the…

Key facts

Port
1521
Protocols
TCP
Range
Registered port, 1024-49151
IANA service name
ncube-lm
Unofficial use
The use described on this page is not the IANA assignment for this port. Source (opens in a new tab) Checked on 30.11.2026

IANA assigns ports in this range to services on request, under RFC 6335.

About port 1521

Port 1521 is registered by IANA for the ncube-lm service (nCube License Manager), but on database servers it is best known as the default port of the Oracle Database Listener.

Common use (unofficial): according to the ports table in the Oracle documentation, the Oracle Net Services Listener uses TCP port 1521 by default, and it can be set to any free port. The Listener is a separate process on the database server that receives client connection requests and passes them to the database. This use is not the IANA assignment, and IANA even notes that unauthorized use of this port has been reported.

What port 1521 is used for

  • Applications: business applications and application servers connect to the database through the Listener, for example with an Easy Connect address such as db.example.com:1521/ORCLPDB1, where ORCLPDB1 is the service name.
  • Management tools: SQL*Plus, SQL Developer, and similar tools connect to the same port.
  • Configuration: according to the Oracle documentation, the Listener settings, including its addresses and port, are stored in the listener.ora file.

Port 1521 in the firewall

Port 1521 should be open only to the application servers and administrators that connect to the database, not to the internet:

  • UFW: ufw allow from 203.0.113.10 to any port 1521 proto tcp
  • firewalld: firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="203.0.113.10" port port="1521" protocol="tcp" accept'

When you restrict access to specific addresses, also delete any earlier rule that opened the port to everyone, or that general rule will keep allowing access from any address.

When the application and the database are on the same server, keep the port closed to outside connections.

Risks and security

A database whose Listener is open to the internet receives scans and automated login attempts. These settings protect the database:

  • Restrict port 1521 to the addresses of the application servers and administrators.
  • Lock accounts that aren't in use, and set strong passwords for the administrator accounts.
  • Give each application its own user, with only the permissions it needs.
  • Encrypt connections between the application and the database, with Oracle Native Network Encryption or with TLS.
  • Install Oracle security updates regularly.

Commands to check and configure

  • lsnrctl status

    Shows the Listener status, the addresses and ports it listens on, and the services registered with it (run as the oracle user).

  • lsnrctl services

    Shows the services the Listener passes connections to.

  • sqlplus appuser@//db.example.com:1521/ORCLPDB1

    Connects to the database in Easy Connect format: server, port, and service name. The password is prompted for separately.

  • ss -tlnp | grep ':1521 '

    Checks that the Listener is listening on port 1521 and on which address (requires root privileges).

  • nc -zv db.example.com 1521

    Checks from the application server whether port 1521 on the database server is open and reachable.

  • ufw allow from 203.0.113.10 to any port 1521 proto tcp

    Allows access to port 1521 only from the specified IP address (UFW).

  • firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="203.0.113.10" port port="1521" protocol="tcp" accept'

    Allows access to port 1521 in firewalld only from the specified IP address. Then run firewall-cmd --reload.

Port 1521 in the IANA registry

Port Protocol Service IANA registry description
1521 TCP ncube-lm nCube License Manager
1521 UDP ncube-lm nCube License Manager

Data source: IANA Service Name and Transport Protocol Port Number Registry (opens in a new tab)

Port 1521 FAQ

How do I connect to an Oracle database on port 1521?

In Easy Connect format, specify the server name, the port, and the service name, for example sqlplus appuser@//db.example.com:1521/ORCLPDB1. You can find the service name in the output of lsnrctl status on the database server.

What does the Listener do in Oracle?

The Listener is a separate process on the database server that receives client connection requests and passes them to the right service in the database. When the Listener isn't running, remote clients can't connect, even if the database itself is running.

Can I change the Listener port?

Yes. According to the Oracle documentation, you can set the Listener to any free port, with Net Configuration Assistant or in the listener.ora file. After the change, update the firewall and the applications' connection strings.

Do I need to open port 1521 to the internet?

No. Port 1521 should be reachable only by the application servers and administrators. When you need to manage the database from changing addresses, first connect to the server over a VPN or SSH.

Shopping cart

Your cart is emptyYou can start with one of our popular plans.

Site search

Accessibility

Text size
100%
Accessibility statement