-
Notifications
You must be signed in to change notification settings - Fork 27
Installation
This is the full installation guide, you may refer to the README for a quick start guide.
- Ubuntu 20.04-23.04, Debian 12 Bookworm
- All Linux distibutions with kernel >= 5.4 should work, but untested.
- There might be issues with frankenstein kernel from RHEL/CentOS/Rocky, feel free to open a bug if you encounter one!
- Windows is not supported (Windows does not support SCTP)
- Go 1.21.0 or more recent
- Root privilege
- Secure boot disabled (for custom kernel module)
PacketRusher is not yet supported on Docker.
- You need to install your Linux Kernel's headers so we can later build the gtp5g kernel
You can do so with the following command:
$ sudo apt install build-essential linux-headers-generic make git wget tar linux-modules-extra-$(uname -r)
- You also need to install golang toolchain from Go's official website, as the golang toolchain in Ubuntu 20.04 / RHEL 8 is too old for usage with PacketRusher
# Warning this command will remove your existing local Go installation if you have one
$ 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
You can do this by adding the following line to your $HOME/.profile
or /etc/profile
(for a system-wide installation):
export PATH=$PATH:/usr/local/go/bin
Note - Changes made to a profile file may not apply until the next time you log into your computer. To apply PATH changes immediately without logging out or rebooting, run the following command:
$ source $HOME/.profile
You now need to clone the PacketRusher repository, and to export the directory where PacketRusher was cloned as an environment variable.
$ git clone https://github.com/HewlettPackard/PacketRusher # or download the ZIP from https://github.com/HewlettPackard/PacketRusher/archive/refs/heads/master.zip and upload it to your Linux server
$ cd PacketRusher && echo "export PACKETRUSHER=$PWD" >> $HOME/.profile && source $HOME/.profile
- You must build and install free5gc's gtp5g kernel module, it is currently used for the the GTP-U / user plane stack of PacketRusher.
- Make sure you have installed the dependencies mentioned earlier, and have Secure boot disabled if you are unable to install the custom Kernel module.
$ cd $PACKETRUSHER/lib/gtp5g
$ make clean && make -j && sudo make install
We can now build PacketRusher!
$ cd $PACKETRUSHER
$ go mod download
$ go build cmd/packetrusher.go
$ ./packetrusher --help
You can now edit the configuration in $PACKETRUSHER/config/config.yml. See the configuration wiki page for more details.
Afterwards, you can run a basic scenario using sudo ./packetrusher ue
while in the $PACKETRUSHER folder.
More complex scenarios are possible using sudo ./packetrusher multi-ue
, see ./packetrusher multi-ue --help
for more details.
See the usage wiki page for more examples.