Skip to content
statance
MenuClose
← All ports

Port 9092: Apache Kafka

High risk

Port 9092 is the default Kafka broker listener, used by producers and consumers to send and read event streams. It should not be reachable from the public internet.

Port
9092
Protocol
TCP
Service
Apache Kafka
Expose to internet?
No
Also used by
Kafka brokers, Redpanda, Confluent Platform

Is port 9092 safe to open?

The default PLAINTEXT listener has no authentication or encryption, so anyone who can reach the broker can read every topic and write messages. Topics often carry customer events, logs and change data from databases.

How to secure Apache Kafka

  • Use SASL_SSL listeners with SCRAM or mTLS authentication.
  • Enable ACLs so clients can only access their own topics.
  • Set advertised.listeners to private addresses and block 9092 from the internet.

Check if port 9092 is open

Linux: what is listening on this port

sudo ss -tlpn | grep ':9092 '

Windows (PowerShell): what is listening

Get-NetTCPConnection -LocalPort 9092 -State Listen | Select-Object LocalAddress, OwningProcess, @{n='Process';e={(Get-Process -Id $_.OwningProcess).Name}}

From another machine: is it reachable

nc -zv HOST 9092 # or nmap -p 9092 HOST # Windows Test-NetConnection HOST -Port 9092

Test the Apache Kafka service itself

kcat -b HOST:9092 -L

Restrict port 9092 in the firewall

Replace 10.0.0.0/8 with the network or address that needs access. Docker publishes container ports through its own iptables rules, which bypass ufw; bind published ports to 127.0.0.1 (-p 127.0.0.1:9092:9092) instead of relying on the host firewall.

ufw: allow only your private network, deny everyone else

sudo ufw allow from 10.0.0.0/8 to any port 9092 proto tcp sudo ufw deny 9092/tcp

firewalld: allow one source network only

sudo firewall-cmd --permanent --remove-port=9092/tcp sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="10.0.0.0/8" port port="9092" protocol="tcp" accept' sudo firewall-cmd --reload

iptables

sudo iptables -A INPUT -p tcp --dport 9092 -s 10.0.0.0/8 -j ACCEPT sudo iptables -A INPUT -p tcp --dport 9092 -j DROP

Windows Firewall (PowerShell, as Administrator)

New-NetFirewallRule -DisplayName "Block 9092 from internet" -Direction Inbound -Protocol TCP -LocalPort 9092 -RemoteAddress Internet -Action Block

Monitor port 9092

Run a TCP port monitor against your public IP on port 9092: here, a failed connection is the healthy result, so you know the firewall is still doing its job. On Linux, the Statance agent also reports every listening port on the server. TCP port monitoring.

Related ports

Port 2181Apache ZooKeeperHigh risk
Port 5672AMQP (RabbitMQ)High risk
Port 9042Apache Cassandra (CQL)High risk

FAQ

What is port 9092 used for?

Port 9092 is the default Kafka broker listener, used by producers and consumers to send and read event streams. It is also used by Kafka brokers, Redpanda, Confluent Platform.

Is it safe to open port 9092?

Not to the public internet. The default PLAINTEXT listener has no authentication or encryption, so anyone who can reach the broker can read every topic and write messages. Topics often carry customer events, logs and change data from databases.

Is port 9092 TCP or UDP?

Apache Kafka uses TCP on port 9092.

How do I check if port 9092 is open?

On the server, run sudo ss -tulpn | grep ':9092 ' (Linux) or Get-NetTCPConnection -LocalPort 9092 (Windows) to see what is listening. From another machine, run nc -zv HOST 9092 or Test-NetConnection HOST -Port 9092.

All ports →

Know the moment a port stops answering.

TCP, HTTP, DNS and SSL checks from six regions, plus server metrics from a one-line agent.