Skip to content
This repository was archived by the owner on Apr 16, 2021. It is now read-only.

Rename bro workers #226

Closed
GoogleCodeExporter opened this issue Mar 24, 2015 · 4 comments
Closed

Rename bro workers #226

GoogleCodeExporter opened this issue Mar 24, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

/usr/local/bin/setup
change:
# cluster config
                cp /usr/local/etc/node.cfg.securityonion /usr/local/etc/node.cfg
                NUM=1
                IP=`ifconfig |grep "inet addr" | awk '{print $2}' |cut -d\: -f2 |grep -v "127.0.0.1" |head -1`
                sed -i "s|host=localhost|host=$IP|g" /usr/local/etc/node.cfg
                grep -v "^#" /etc/nsm/sensortab | awk '{print $4}' |while read INTERFACE
                do
                        echo "* Configuring Bro to monitor $INTERFACE" | tee -a $LOG
                        cat << EOF >> /usr/local/etc/node.cfg
[worker-$NUM]   
type=worker
host=$IP
interface=$INTERFACE

EOF
                        let NUM=NUM+1
                done
        fi
to:
# cluster config
                cp /usr/local/etc/node.cfg.securityonion /usr/local/etc/node.cfg
                IP=`ifconfig |grep "inet addr" | awk '{print $2}' |cut -d\: -f2 |grep -v "127.0.0.1" |head -1`
                sed -i "s|host=localhost|host=$IP|g" /usr/local/etc/node.cfg
                grep -v "^#" /etc/nsm/sensortab | awk '{print $1}' |while read SENSOR
                do
                        INTERFACE=`grep $SENSOR /etc/nsm/sensortab|awk '{print $4}'`
                        echo "* Configuring Bro to monitor $INTERFACE" | tee -a $LOG
                        cat << EOF >> /usr/local/etc/node.cfg
[$SENSOR]   
type=worker
host=$IP
interface=$INTERFACE

EOF
                done
        fi


In-place upgrade will need to:
broctl stop
modify /usr/local/etc/node.cfg as follows:
worker-1 --> hostname-eth0
worker-2 --> hostname-eth1
broctl install
broctl start


Original issue reported on code.google.com by doug.bu...@gmail.com on 17 Feb 2012 at 8:11

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant