我已经在Debian Linux Squeeze机器上安装了RabbitMQ,我希望它仅侦听localhost接口。我已经添加了
RABBITMQ_NODE_IP_ADDRESS=127.0.0.1
到我的/etc/rabbitmq/rabbitmq.conf
文件,这使得它在侦听amqp
端口(5672)时仅绑定到localhost接口。但是,当侦听端口epmd(4369)和43380时,它仍绑定到所有接口:
# lsof -n -a -i -urabbitmq
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
epmd 7353 rabbitmq 3u IPv4 1177662 0t0 TCP *:epmd (LISTEN)
epmd 7353 rabbitmq 5u IPv4 1177714 0t0 TCP 127.0.0.1:epmd->127.0.0.1:50877 (ESTABLISHED)
beam.smp 7365 rabbitmq 10u IPv4 1177711 0t0 TCP *:43380 (LISTEN)
beam.smp 7365 rabbitmq 11u IPv4 1177713 0t0 TCP 127.0.0.1:50877->127.0.0.1:epmd (ESTABLISHED)
beam.smp 7365 rabbitmq 19u IPv4 1177728 0t0 TCP 127.0.0.1:amqp (LISTEN)
我该如何预防?我是否必须设置iptables,或者是否有其他RabbitMQ配置选项可以使其按我的意愿工作?