# Kafka集群无法外网访问问题解决攻略

Kafka集群无法外网访问问题解决方法

kafka服务器：

kafka是默认配置，没有修改：

#listeners=PLAINTEXT://:9092
zookeeper.connect=localhost:2181

1，本机绑定host，即修改/etc/hosts，添加10.10.10.10 hostname到hosts文件。

#listeners=PLAINTEXT://:9092
zookeeper.connect=localhost:2181
Listeners to publish to ZooKeeper for clients to use, if different than the listeners above. In IaaS environments, this may need to be different from the interface to which the broker binds. If this is not set, the value for listeners will be used.