Executive Summary: The First Line of Database Defense
When securing Oracle databases, security teams naturally focus on Transparent Data Encryption (TDE), Unified Auditing, and Database Vault. Yet the earliest point of contact for every legitimate client—and every malicious port scanner—is Oracle Net Services operating at Layer 7.
By default, an out-of-the-box Oracle database listener accepts connections from any reachable IP address on the network, tolerates endless TCP handshake stalls, permits legacy cryptographic negotiations, and leaves dead client sessions holding exclusive row locks indefinitely.
Hardening sqlnet.ora creates a zero-cost software firewall directly at the database tier. This production runbook covers five mission-critical parameters that eliminate connection exhaustion attacks, banish zombie locks, and enforce cryptographic rigor across Oracle 19c and 23ai environments.
1. Network Defense Architecture & Traffic Inspection Flow
Securing sqlnet.ora intercepts incoming connections before authentication payloads or SQL parsing ever touch the database SGA.
TCP.VALIDNODE_CHECKING filters client IP against invited subnets before handshake.
SQLNET.INBOUND_CONNECT_TIMEOUT evicts unauthenticated connections within seconds.
SQLNET.ALLOWED_LOGON_VERSION_SERVER blocks obsolete 10g/11g password hash downgrades.
Wire-level Native Network Encryption negotiates AES-256 for all queries and results.
2. Parameter 1: Subnet Access Control via TCP.VALIDNODE_CHECKING
Default Oracle installations allow any routable host to attempt a database login. If a web server in the DMZ or a compromised developer laptop scans port 1521, the listener willingly spawns server processes to evaluate credentials.
TCP.VALIDNODE_CHECKING implements kernel-level IP whitelisting within Oracle Net:
# Enforce Valid Node Checking on Server Listener
TCP.VALIDNODE_CHECKING = YES
# Whitelist trusted application subnets, backup gateways, and DBA bastion hosts
TCP.INVITED_NODES = ( \
127.0.0.1, \
10.10.40.0/24, \
10.10.50.15, \
10.10.50.16, \
192.168.100.0/24 \
)
Critical Operational Rules
- Always Include Localhost: If
127.0.0.1and the server’s own physical hostname/IP are omitted, local utilities like Enterprise Manager agents, local Grid Infrastructure scripts, and local SQL*Plus connections via EZConnect fail instantly. - CIDR Notation Support: In modern Oracle 19c (19.3+) and 23ai, CIDR notation (e.g.
10.10.40.0/24) is natively supported. Avoid massive comma-delimited lists of individual IPs that risk hitting the 32KB configuration line buffer. - Behavior on Rejection: Unauthorized IP connections are aborted immediately during the TCP handshake with
ORA-12537: TNS:connection closedbefore any database process is spawned.
3. Parameter 2: Mitigating Connection Storms with SQLNET.INBOUND_CONNECT_TIMEOUT
One of the most destructive denial-of-service vectors against Oracle is a half-open connection attack. A malicious client or un-tuned microservice opens a TCP socket to port 1521, initiates the Oracle Net connect packet, but never completes the authentication handshake.
By default, older Oracle versions allowed up to 60 seconds before aborting incomplete connections. Under high concurrency, hundreds of abandoned sockets exhaust the listener’s QUEUESIZE and operating system process tables, preventing legitimate applications from connecting.
Production Hardening Standard
Configure matching timeouts in both listener.ora and sqlnet.ora:
# $ORACLE_HOME/network/admin/sqlnet.ora
SQLNET.INBOUND_CONNECT_TIMEOUT = 10
# $ORACLE_HOME/network/admin/listener.ora
INBOUND_CONNECT_TIMEOUT_LISTENER = 10
Setting this to 10 seconds ensures that:
- Any socket that fails to negotiate TLS, present credentials, and establish a database session within 10 seconds is forcibly terminated.
- Aborted handshakes are logged in the database alert log with
ORA-03136: inbound connection timed out, allowing security monitoring tools (Splunk, Datadog) to alert on port scanning. - Backend server memory and PGA are immediately released back to the operating system.
4. Parameter 3: Evicting Zombie Locks via SQLNET.EXPIRE_TIME (DCD)
In enterprise architectures, stateful firewalls and cloud security groups terminate idle TCP sockets without sending TCP FIN or RST packets to either endpoint.
When a client application server reboots abruptly or an edge firewall quietly drops an idle state table entry, the Oracle dedicated server process (oracleORCL) remains running in memory. Worse, if that client was in the middle of an uncommitted transaction, it continues to hold exclusive row-level and table-level locks. This leads to application-wide blocking cascades and ORA-00060: deadlock detected errors hours later.
Dead Connection Detection (DCD)
SQLNET.EXPIRE_TIME activates Dead Connection Detection at Layer 7:
# Send DCD keepalive probe every 5 minutes (in minutes)
SQLNET.EXPIRE_TIME = 5
How DCD Works Under the Hood
- Every 5 minutes of inactivity on a connection, the Oracle database server transmits a small 10-byte probe packet to the client.
- If the client host is alive, its TCP stack acknowledges the probe transparently without waking the client application.
- If the network path is broken or the client has rebooted, the probe receives no ACK. After standard TCP retransmission limits expire, the Oracle kernel declares the connection dead.
- The database background process immediately rolls back uncommitted transactions, releases all row locks, and terminates the dedicated server process, preventing database deadlocks.
5. Parameter 4: Blocking Password Hash Downgrades with SQLNET.ALLOWED_LOGON_VERSION_SERVER
Historically, Oracle used proprietary DES-based password hashes (the legacy 10g/11g 16-character verifiers). These verifiers are vulnerable to offline brute-force cracking using modern GPUs.
Attackers attempting credential stuffing against an Oracle database will purposely initiate an authentication handshake requesting the legacy 10g authentication protocol, forcing the server to authenticate using the weaker verifier.
Enforcing FIPS-Compliant SHA-2 Authentication
Lock down the minimum acceptable client authentication version in sqlnet.ora:
# Enforce modern 12c/19c/23ai SHA-2 authentication verifiers
SQLNET.ALLOWED_LOGON_VERSION_SERVER = 12a
SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 12a
Authentication Verifier Compatibility
| Value | Minimum Client Supported | Verifier Permitted | Security Posture |
|---|---|---|---|
8 |
Oracle 8.1.7+ | 10g (DES), 11g (SHA-1), 12c (SHA-2) | 🔴 Dangerous / Insecure |
11 |
Oracle 11.2+ | 11g (SHA-1), 12c (SHA-2) | 🟡 Deprecated |
12 |
Oracle 12.1+ | 12c (SHA-2 512-bit) | 🟢 Secure |
12a |
Oracle 12.2+ / 19c / 23ai | Strict 12c verifiers (Excludes legacy hash fallback) | 🛡️ Production Hardened |
If an obsolete client (such as an unpatched legacy 10g client) attempts to connect, the database instantly rejects the handshake with ORA-28040: No matching authentication protocol.
6. Parameter 5: Zero-Wallet Native Network Encryption (AES-256)
Many database administrators believe that encrypting database traffic over the network requires creating an Oracle Wallet, generating SSL/TLS certificates, and managing PKI expiration dates.
While Mutual TLS (TCPS) provides certificate validation, Oracle Net Services includes Native Network Encryption (NNE) built into every enterprise edition without requiring a single certificate, wallet, or additional license.
Enforcing AES-256 Wire Encryption
Place the following configuration in $ORACLE_HOME/network/admin/sqlnet.ora on the database server:
# ==============================================================================
# Native Network Encryption (NNE) Production Hardening
# ==============================================================================
# Require encryption: Reject any client that attempts plaintext communication
SQLNET.ENCRYPTION_SERVER = REQUIRED
SQLNET.ENCRYPTION_TYPES_SERVER = (AES256, AES192, AES128)
# Require cryptographic checksumming to prevent packet tampering
SQLNET.CRYPTO_CHECKSUM_SERVER = REQUIRED
SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER = (SHA512, SHA384, SHA256)
Validating Active Network Encryption
You can verify that active client sessions are transmitting encrypted packets by querying v$session_connect_info:
SELECT s.sid, s.serial#, s.username, s.program,
c.network_service_banner
FROM v$session s
JOIN v$session_connect_info c ON s.sid = c.sid
WHERE s.username IS NOT NULL
AND c.network_service_banner LIKE '%Encryption service%'
OR c.network_service_banner LIKE '%Crypto-checksumming%';
Sample output confirming active AES-256 encryption:
SID USERNAME PROGRAM NETWORK_SERVICE_BANNER
--- -------- ---------------- -------------------------------------------------------------
42 APP_USER JDBC Thin Client Oracle Advanced Security: encryption service for AES256
42 APP_USER JDBC Thin Client Oracle Advanced Security: crypto-checksumming service for SHA512
7. Master Production sqlnet.ora Template
Here is the complete, consolidated production template ready for deployment on Oracle Database 19c and 23ai hosts:
# ==============================================================================
# DBPros.Net Hardened Production sqlnet.ora Template
# Platform: Oracle Database 19c / 23ai on Enterprise Linux
# ==============================================================================
# 1. Directory Pathing and Domain Resolution
NAMES.DIRECTORY_PATH = (TNSNAMES, EZCONNECT)
# 2. Layer 7 Subnet Access Control (VNCR)
TCP.VALIDNODE_CHECKING = YES
TCP.INVITED_NODES = ( \
127.0.0.1, \
10.10.0.0/16, \
192.168.1.0/24 \
)
# 3. Connection Storm & DoS Mitigation
SQLNET.INBOUND_CONNECT_TIMEOUT = 10
# 4. Dead Connection Detection (DCD Keepalive Probe in Minutes)
SQLNET.EXPIRE_TIME = 5
# 5. Password Verifier & Protocol Downgrade Lockdown
SQLNET.ALLOWED_LOGON_VERSION_SERVER = 12a
SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 12a
# 6. Native Network Encryption & Data Integrity (Zero-Wallet AES-256)
SQLNET.ENCRYPTION_SERVER = REQUIRED
SQLNET.ENCRYPTION_TYPES_SERVER = (AES256, AES192, AES128)
SQLNET.CRYPTO_CHECKSUM_SERVER = REQUIRED
SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER = (SHA512, SHA384, SHA256)
# 7. Diagnostic Logging & Trace Restriction
DIAG_ADR_ENABLED = ON
TRACE_LEVEL_SERVER = OFF
TRACE_LEVEL_CLIENT = OFF
8. Operational Troubleshooting & Error Triage
When applying these parameters, monitor client connectivity closely. Use this matrix to triage potential issues:
Diagnostic 1: Resolving ORA-03136 (Inbound connection timed out)
- Underlying Cause: Legitimate client application took longer than
SQLNET.INBOUND_CONNECT_TIMEOUT(10 seconds) to complete authentication, typically due to DNS reverse lookup latency on the database server. - Resolution: Ensure the database server’s
/etc/resolv.confis optimized and reverse DNS lookups are not hanging. If application clients connect from high-latency WAN links, adjust the timeout to 15 or 20 seconds.
Diagnostic 2: Resolving ORA-12537 (TNS:connection closed)
- Underlying Cause: Client IP address was rejected by
TCP.INVITED_NODES. - Resolution: Inspect the listener log (
$ORACLE_BASE/diag/tnslsnr/<host>/listener/trace/listener.log). Identify the rejected client IP and add the appropriate subnet toTCP.INVITED_NODESinsqlnet.ora, then reload the listener (lsnrctl reload).
Diagnostic 3: Resolving ORA-28040 (No matching authentication protocol)
- Underlying Cause: An older JDBC driver (e.g. Oracle 11.2 or older third-party tool) attempted to connect, but the server rejected its legacy password hash.
- Resolution: Upgrade the client application’s JDBC Thin driver to
ojdbc8.jarorojdbc11.jar. If temporary legacy access is required during migration, temporarily lowerSQLNET.ALLOWED_LOGON_VERSION_SERVERto12while the client runtime is upgraded.
📚 Official Documentation & Technical References
- Oracle Database Net Services Reference: Oracle Database Net Services Reference (Release 19c & 23ai) — Official documentation for valid node checking, inbound timeouts, and encryption directives.
- Oracle Database Net Services Administrator’s Guide: Configuring Network Access Control and Dead Connection Detection — Comprehensive instructions for managing DCD keepalives and firewall timeouts.
- Oracle Database Security Guide: Oracle Database Security Guide (Release 19c & 23ai) — Cryptographic algorithm negotiation, cipher suites, and verification queries.
Need an expert security audit of your Oracle Net architecture or assistance rolling out enterprise-wide network encryption? Contact our Principal Oracle Security Architects or explore our Infrastructure Security & Health Audit Services.