problem with creating listening socket in bro

Hello,

I was trying to create listening socket in bro via communication framework ( “base/frameworks/communication/main.bro” ). I run the above mention script after adding a Node in the nodes table, then I run netstat command to check if there is any listening port (default port) open but there isn’t.

Following is the output of communication.log file.

1367582532.150345 bro parent - - - info raised pipe’s socket buffer size from 224K to 1024K
1367582532.150345 bro parent - - - info communication started, parent pid is 13482, child pid is 13484
1367582538.673958 bro child - - - info selects=100000 canwrites=0 timeouts=100000
1367582545.197614 bro child - - - info selects=200000 canwrites=0 timeouts=200000
1367582551.720802 bro child - - - info selects=300000 canwrites=0 timeouts=300000
1367582558.242728 bro child - - - info selects=400000 canwrites=0 timeouts=400000
1367582564.762133 bro child - - - info selects=500000 canwrites=0 timeouts=500000

when I checked, what the above mentioned script was doing, it was calling enable_communication function,

function enable_communication%(%): any

shouldn’t that script also call ‘listen’ function.

function listen%(ip: addr, p: port, ssl: bool, ipv6: bool, zone_id: string, retry_interval: interval%) : bool

maybe that’s the reason it isn’t opening listening port?

Regards,

zaafar

What did you put into the Communication::nodes table?

  .Seth

I added localhost.
redef Communication::nodes += { [“localhost”] = [$host=127.0.0.1] };

You can refer to base/frameworks/cluster/setup-connections.bro if you want to see some examples of Communication::nodes being configured.

  .Seth

thanks, for pointing that out :slight_smile:

Regards,