mirror of https://github.com/MISP/MISP
The following commit contains the fix for ZeroMQ only listening on 0.0.0.0pull/7053/head
parent
7d9251e7ad
commit
bc04f6966d
|
@ -273,6 +273,7 @@ class PubSubTool
|
|||
'redis_password' => '',
|
||||
'redis_database' => '1',
|
||||
'redis_namespace' => 'mispq',
|
||||
'host' => '127.0.0.1',
|
||||
'port' => '50000',
|
||||
'username' => null,
|
||||
'password' => null,
|
||||
|
|
|
@ -6220,6 +6220,15 @@ class Server extends AppModel
|
|||
'type' => 'boolean',
|
||||
'afterHook' => 'zmqAfterHook',
|
||||
),
|
||||
'ZeroMQ_host' => array(
|
||||
'level' => 2,
|
||||
'description' => __('The host that the pub/sub feature will use.'),
|
||||
'value' => '127.0.0.1',
|
||||
'errorMessage' => '',
|
||||
'test' => 'testForEmpty',
|
||||
'type' => 'string',
|
||||
'afterHook' => 'zmqAfterHook',
|
||||
),
|
||||
'ZeroMQ_port' => array(
|
||||
'level' => 2,
|
||||
'description' => __('The port that the pub/sub feature will use.'),
|
||||
|
|
|
@ -102,8 +102,8 @@ class MispZmq:
|
|||
self.socket = context.socket(zmq.PUB)
|
||||
if self.settings["username"]:
|
||||
self.socket.plain_server = True # must come before bind
|
||||
self.socket.bind("tcp://*:{}".format(self.settings["port"]))
|
||||
self._logger.debug("ZMQ listening on tcp://*:{}".format(self.settings["port"]))
|
||||
self.socket.bind("tcp://{}:{}".format(self.settings["host"], self.settings["port"]))
|
||||
self._logger.debug("ZMQ listening on tcp://{}:{}".format(self.settings["host"], self.settings["port"]))
|
||||
|
||||
if self._logger.isEnabledFor(logging.DEBUG):
|
||||
monitor = self.socket.get_monitor_socket()
|
||||
|
|
Loading…
Reference in New Issue