CyberHunter
// Databases & caches

Port 118: SQL Services

Port 118 is assigned by IANA to sqlserv (SQL Services).

118

How sqlserv works

Databases & caches
app:118sqlserv app:118sqlserv

The application sends a SQL query to the sqlserv server on port 118, which returns rows from its tables.

Transport
TCP · UDP
Exposure risk
not rated depends on the program listening
Encryption
Unknownnot stated by the registry
IANA status
Assigned1 registered service
Range
Well-known (0-1023)
01 Security

Is port 118 dangerous?

We have no specific security note for port 118. Its risk depends on the program actually listening on it. General advice for databases & caches services:

  • Bind the service to localhost or a private network, never to a public address.
  • Enable authentication, use per-application accounts and require TLS.
  • Watch for exposed Docker ports: publish them on 127.0.0.1 only.
02 Registry

IANA registry entries for port 118

ServicePortTransportDescriptionReferenceUpdated
sqlserv 118 TCP, UDP SQL Services - -

// source: IANA service name and port number registry

03 Check it

Which program uses port 118, and is it reachable?

Linux

sudo ss -ltnup 'sport = :118'      # process listening on 118
sudo lsof -nP -i :118

macOS

sudo lsof -nP -i :118

Windows (PowerShell)

Get-NetTCPConnection -LocalPort 118 -State Listen | Select LocalAddress, OwningProcess
Get-NetUDPEndpoint -LocalPort 118
netstat -ano | findstr :118

From another machine

nmap -p 118 -sV <host>
sudo nmap -sU -p 118 <host>
nc -zv <host> 118

Block it in the firewall

sudo ufw deny 118/tcp                                         # Linux (ufw)
New-NetFirewallRule -DisplayName "Block 118" -Direction Inbound -LocalPort 118 -Protocol TCP -Action Block  # Windows
04 FAQ
What is port 118 used for?

Port 118 is assigned by IANA to sqlserv (SQL Services).

Is port 118 TCP or UDP?

Port 118 is registered for TCP and UDP.

Is it safe to open port 118?

It depends on the program that listens on it. Open it only for a service you know and only to the networks that need it. Bind the service to localhost or a private network, never to a public address.

How do I check if port 118 is open?

On Linux run "ss -ltnup 'sport = :118'", on macOS "lsof -nP -i :118", and on Windows "netstat -ano | findstr :118" to see the local process. From another machine, "nmap -p 118 <host>" shows whether it is reachable.

05 Related