Skip to content

Instantly share code, notes, and snippets.

@austinsonger
Last active July 8, 2022 02:21
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save austinsonger/23bfc812382b44eaed001908e94bc2cf to your computer and use it in GitHub Desktop.
Save austinsonger/23bfc812382b44eaed001908e94bc2cf to your computer and use it in GitHub Desktop.
# CentOS-PowerTools.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[PowerTools]
name=CentOS-$releasever - PowerTools
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$releasever/PowerTools/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
# zeek - Centos - /etc/sysconfig/network-scripts/ifcfg-<sniffinginterface>
#
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=<interface>
DEVICE=<interface>
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
USERS=root
NM_CONTROLLED=no
ETHTOOL_OPTS="-G ${DEVICE} rx 4096; -K ${DEVICE} rx off; -K ${DEVICE} tx off; -K ${DEVICE} sg off; -K ${DEVICE} tso off; -K ${DEVICE} ufo off; -K ${DEVICE} gso off; -K ${DEVICE} gro off; -K ${DEVICE} lro off"
As root/sudo, edit /etc/yum.repos.d/CentOS-PowerTools.repo and set the “enabled” field to 1, to add the PowerTools repository. Your file should look something like this.
sudo yum --enablerepo=extras install epel-release
sudo yum install cmake make gcc gcc-c++ flex bison jemalloc-devel libpcap-devel openssl-devel platform-python-devel swig zlib-devel
sudo yum update
sudo reboot
# Add the following lines
#
[Unit]
Description=Makes an interface run in promiscuous mode at boot
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/ip link set dev etho0 promisc on
TimeoutStartSec=0
RemainAfterExit=yes
[Install]
WantedBy=default.target
@Aman9026
Copy link

Aman9026 commented Apr 3, 2021

Finally able to configure powertools after 12 hours of searching the correct repo link, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment