List of (for me) useful network tools and a few scripts to set them up.

Marek Küthe 82398fd4fa Improve dn42 ascii art hace 1 mes
.woodpecker 33e9fb9a0f Rename woodpecker pipeline hace 1 año
images 5812e84c13 Initial commit hace 1 año
scripts d45665e8db Fix copy-paste mistake hace 3 meses
.gitignore 5812e84c13 Initial commit hace 1 año
.shellcheckrc 49428b4bde Improve script style hace 1 año
LICENSE 71a56eec8f Initial commit hace 1 año
README.md 08997d474c Add links to other pages hace 2 meses
android.md 3b204c39a6 Format android section hace 3 meses
ascii-art.md 82398fd4fa Improve dn42 ascii art hace 1 mes

README.md

Network tools

                   _________
              _--^^    __   ^^^-_
          _-^^        -  -       ^^-_
        _-          +^    ^-         ^_
       -          +^        ^-         ^_
     _^           ----    ----           +
    +                |    |               |
   -         _       |    |      _         |
   |         |^-     |    |    _^ |         -
  -  ________|  ^-           -^   |_______  |
  |  |            ^-        ^            |  |
  |  |_______     -^       ^-     _______|  |
   |         |  _^    ____   ^-   |         +
   -         |-^     |    |    ^-_|        +
    +                |    |               +
     +           ____|    |____          +
      +          |            |         +
       ^+         ^-_       -^        +^
         ^-_        ^_    -^       _+^
            ^-_       ^--^      _-+
                ^+--______--++^^

Tools

Installation

The following instructions can be used to install the programs listed above:

  • Debian: sudo apt-get install mtr iputils-tracepath iputils-ping iputils-clockdiff iputils-arping traceroute socat nmap nmap-common ncat netcat-openbsd tcpdump bind9-dnsutils dnsdiag ldns scamper curl wget openssh-client wireshark tshark iftop termshark iperf3 fping
    • Scapy: sudo apt-get install python3-scapy python3-matplotlib python3-pyx python3-cryptography ipython3 graphviz imagemagick sox
  • Arch Linux: sudo pacman --sync --needed mtr iputils traceroute socat nmap openbsd-netcat tcpdump bind curl wget openssh iftop wireshark-cli wireshark-qt termshark iperf3 fping
  • Alpine: sudo apk add mtr mtr-gtk iputils traceroute socat socat-scripts nmap nmap-ncat nmap-nping nmap-scripts netcat-openbsd tcpdump bind-tools ldnsutils curl wget openssh wireshark tshark iftop termshark iperf3 fping
    • Documentation: sudo apk add mtr-doc traceroute-doc socat-doc nmap-doc netcat-openbsd-doc tcpdump-doc bind-doc curl-doc wget-doc openssh-doc wireshark-doc iftop-doc fping-doc
    • Scapy: sudo apk add scapy scapy-doc py3-matplotlib py3-cryptography ipython graphviz imagemagick sox
  • FreeBSD: doas pkg install mtr socat nmap tcpdump bind-tools ldns scamper curl wget wireshark termshark iftop iperf3 fping
    • Scapy: doas pkg install py311-scapy py311-pyx py311-ipython
  • Termux: pkg install tracepath traceroute socat nmap netcat-openbsd dnsutils ldns wget openssh iperf3
    • Termux (with root-packages): pkg install mtr tcpdump tshark termshark
    • Termux (with x11-packages): pkg install wireshark-qt

Alternatively, you can use the script ./scripts/install_tools.sh, which tries to automatically detect the package manager and install the programs.

Capabilities

Some programs (nmap, nping traceroute or scapy) require the capability to open raw sockets in order to be able to use all functions. This can be set with the command setcap cap_net_raw+ep /path/to/program. Alternatively, the script ./scripts/set_capabilties.sh tries to set the capabilities automatically.

Scamper

Scamper enters a chroot at startup. For this to be possible, the program must be executed as root. To enable normal users to run scamper anyway, the setuid bit can be set, which means that anyone can run scamper as root (or as the owner of scamper, which is root). To set the setuid-bit automatically, the script ./scripts/scamper_setuid.sh can be used.

Aliases

I find some aliases useful for some programs:

  • tracepath: tracepath uses a random port by default. So that tracepath uses the same ports as traceroute, the parameter -p 33434 can be set. This is useful, for example, if firewalls only allow the ports of traceroute accordingly.
  • nmap / nping: nmap and nping assume by default that they are not allowed to use raw sockets. However, if the capabilities have been set accordingly, they are allowed to do so. To tell the programs this (without having to run them as root), you can use the --privileged parameter.

To have these aliases set automatically in the .bashrc file, the ./scripts/set_bash_aliases.sh script can be used.