add tcpdump script

This commit is contained in:
pi-farm
2023-11-20 23:35:07 +01:00
parent c992331a20
commit 540d7b9bf0
3 changed files with 16 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
FROM ubuntu:latest FROM ubuntu:latest
RUN apt-get update && apt upgrade -y && apt-get autoremove -y RUN apt-get update && apt upgrade -y && apt-get autoremove -y
RUN apt-get install util-linux nano xz-utils wget systemctl sudo git -y RUN apt-get install util-linux nano xz-utils wget systemctl sudo git tcpdump -y
ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.6.0/s6-overlay-noarch.tar.xz /tmp ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.6.0/s6-overlay-noarch.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz

4
scripts/tcpdump.sh Normal file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
tcpdump port 67 or port 68 or port 69
exit

View File

@@ -14,6 +14,8 @@ menue()
echo "x) Stop the docker-containers" echo "x) Stop the docker-containers"
echo "u) Update the PXE-Server" echo "u) Update the PXE-Server"
echo "" echo ""
echo "t) Show TCPDUMP on port 67-69 of the PXE-Container"
echo ""
echo "D) DELETE the existing docker-containers and docker images completely" echo "D) DELETE the existing docker-containers and docker images completely"
echo "" echo ""
echo "EXIT Exit this script, but PXE-Server is running, if started" echo "EXIT Exit this script, but PXE-Server is running, if started"
@@ -78,6 +80,15 @@ menue()
;; ;;
############################################# #############################################
t) clear
docker exec -it pxe-container bash tcpdump.sh
clear
echo "TCPDUMP stopped"
echo""
menue
;;
#############################################
D) clear D) clear
docker-compose down docker-compose down
docker rmi pxe-image:latest docker rmi pxe-image:latest