To run PacketRusher on older RHEL9 versions (tested on Rocky-9.0-20220805.0-x86_64-minimal.iso), follow these steps to prepare the environment:
- Update Yum Repositories: Point your yum repositories to the archived 9.0 vault.
- Install Dependencies: Install essential build tools, kernel headers, and SCTP tools.
- Configure SCTP Kernel Module: Enable the
sctp module and ensure it is not blacklisted. - Install Golang: Download and install Go 1.21.3. Warning: This process will remove any existing local Go installation at
/usr/local/go. - Set Environment Variables: Add the Go binary to your
PATH and set the PACKETRUSHER variable to your source directory.
Note on Secure Boot: If you are unable to install the custom Kernel module, ensure Secure Boot is disabled by checking the status with mokutil --sb-state.
# 1. Change yum repo to the archived 9.0 one
$ sudo find /etc/yum.repos.d -type f -exec sed -i -e "s,#baseurl=http://dl.rockylinux.org/\$contentdir/\$releasever,baseurl=https://download.rockylinux.org/vault/rocky/9.0,g" {} \;
$ sudo find /etc/yum.repos.d -type f -exec sed -i -e "s,mirrorlist,#mirrorlist,g" {} \;
$ sudo find /etc/yum.repos.d -type f -exec sed -i -e "s,/os/,/kickstart/,g" {} \;
# 2. Install the required packages
$ sudo yum install git wget tar make automake gcc gcc-c++ kernel-devel-$(uname -r) kernel-modules-extra-$(uname -r) lksctp-tools lksctp-tools-devel lksctp-tools-doc mokutil
# 3. Install sctp kernel module
$ echo sctp | sudo tee /etc/modules-load.d/sctp.conf
$ sudo sed -i 's/blacklist sctp/#blacklist sctp/g' /etc/modprobe.d/sctp-blacklist.conf
$ sudo sed -i 's/blacklist sctp_diag/#blacklist sctp_diag/g' /etc/modprobe.d/sctp_diag-blacklist.conf
$ sudo modprobe sctp
# 4. Install Golang (Warning: removes existing /usr/local/go)
$ wget https://go.dev/dl/go1.21.3.linux-amd64.tar.gz && sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.3.linux-amd64.tar.gz
$ echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.profile
# 5. Setup PacketRusher environment
$ git clone https://github.com/HewlettPackard/PacketRusher
$ cd PacketRusher && echo "export PACKETRUSHER=$PWD" >> $HOME/.profile
$ source $HOME/.profile