Skip to content

Instantly share code, notes, and snippets.

@djenriquez
Last active July 5, 2018 23:04
Show Gist options
  • Save djenriquez/73121f2917e1987c0323551387529136 to your computer and use it in GitHub Desktop.
Save djenriquez/73121f2917e1987c0323551387529136 to your computer and use it in GitHub Desktop.
RSyslog-OMKafka DoS Fix (AMZN Linux)
#!/bin/bash
# On Amazon Linux
mkdir -p /tmp/rsyslog-fix && cd /tmp/rsyslog-fix
git clone https://github.com/edenhill/librdkafka.git
# Install Libredkafka
cd librdkafka && . configure
make
sudo make install
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
# Download and install rsyslog dependencies
cd ..
curl http://download.rsyslog.com/liblogging/liblogging-1.0.6.tar.gz | tar -xz
cd liblogging-1.0.6 && ./configure --prefix=/usr/local
make
sudo make install
cd ..
curl http://download.rsyslog.com/libfastjson/libfastjson-0.99.3.tar.gz | tar -xz
cd libfastjson-0.99.3 && ./configure --prefix=/usr/local
make
sudo make install
cd ..
curl http://libestr.adiscon.com/files/download/libestr-0.1.10.tar.gz | tar -xz
cd libestr-0.1.10 && ./configure --prefix=/usr/local
make
sudo make install
cd ..
curl http://www.rsyslog.com/files/download/rsyslog/rsyslog-8.25.0.tar.gz | tar -xz
cd rsyslog-8.25.0/
# Remove
yum remove json-c-0.11-6.8.amzn1.x86_64
sudo yum install git \
valgrind \
autoconf \
automake \
flex \
bison \
python-docutils \
python-sphinx \
json-c-devel \
libuuid-devel \
libgcrypt-devel \
zlib-devel \
openssl-devel \
libcurl-devel \
gnutls-devel \
mysql-devel \
postgresql-devel \
libdbi-dbd-mysql \
libdbi-devel \
net-snmp-devel
./configure --enable-omkafka
make
sudo make install
mv -f service /usr/sbin/rsyslogd /sbin/rsyslogd
service rsyslog restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment