Compare commits

..

6 commits

Author SHA1 Message Date
t3chn0m4g3
a67a765dd7 bump to node 20.15.1 2024-12-06 13:09:27 +01:00
t3chn0m4g3
9ce2204c4b cleanup 2024-12-06 12:52:24 +01:00
t3chn0m4g3
35fd6da287 bump elastic stack to 8.16.1 2024-12-06 12:28:20 +01:00
t3chn0m4g3
ce6eef8dc0 update version tag 2024-12-06 11:07:34 +01:00
t3chn0m4g3
b2db048671 clarify dps.sh => dps 2024-12-06 11:04:08 +01:00
t3chn0m4g3
d416d2e56b tweaking / improving:
- add glutton to builder
- reduce parallel builds to 2
- require root for tc
- add docker logins
2024-12-06 09:55:31 +01:00
7 changed files with 31 additions and 21 deletions

View file

@ -418,7 +418,7 @@ You can also login from your browser and access the T-Pot WebUI and tools: `http
<br><br>
## Standalone First Start
There is not much to do except to login and check via `dps.sh` if all services and honeypots are starting up correctly and login to Kibana and / or Geoip Attack Map to monitor the attacks.
There is not much to do except to login and check via `dps` if all services and honeypots are starting up correctly and login to Kibana and / or Geoip Attack Map to monitor the attacks.
<br><br>
## Distributed Deployment
@ -702,7 +702,7 @@ git reset --hard
<br><br>
## Show Containers
You can show all T-Pot relevant containers by running `dps` or `dpsw [interval]`. The `interval (s)` will re-run `dps.sh` periodically.
You can show all T-Pot relevant containers by running `dps` or `dpsw [interval]`. The `interval (s)` will re-run `dps` periodically.
<br><br>
## Blackhole

View file

@ -1,5 +1,13 @@
#!/usr/bin/env bash
# Got root?
myWHOAMI=$(whoami)
if [ "$myWHOAMI" != "root" ]
then
echo "Need to run as root ..."
exit
fi
# ANSI color codes for green (OK) and red (FAIL)
GREEN='\033[0;32m'
RED='\033[0;31m'
@ -8,7 +16,7 @@ NC='\033[0m' # No Color
# Default settings
PUSH_IMAGES=false
NO_CACHE=false
PARALLELBUILDS=8
PARALLELBUILDS=2
UPLOAD_BANDWIDTH=40mbit # Set this to max 90% of available upload bandwidth
INTERFACE=$(/sbin/ip address show | /usr/bin/awk '/inet.*brd/{ print $NF; exit }')
@ -26,6 +34,8 @@ while getopts ":pnh" opt; do
case ${opt} in
p )
PUSH_IMAGES=true
docker login
docker login ghcr.io
;;
n )
NO_CACHE=true
@ -43,7 +53,7 @@ done
# Function to apply upload bandwidth limit using tc
apply_bandwidth_limit() {
echo -n "Applying upload bandwidth limit of $UPLOAD_BANDWIDTH on interface $INTERFACE..."
if sudo tc qdisc add dev $INTERFACE root tbf rate $UPLOAD_BANDWIDTH burst 32kbit latency 400ms >/dev/null 2>&1; then
if tc qdisc add dev $INTERFACE root tbf rate $UPLOAD_BANDWIDTH burst 32kbit latency 400ms >/dev/null 2>&1; then
echo -e " [${GREEN}OK${NC}]"
else
echo -e " [${RED}FAIL${NC}]"
@ -51,7 +61,7 @@ apply_bandwidth_limit() {
# Try to reapply the limit
echo -n "Reapplying upload bandwidth limit of $UPLOAD_BANDWIDTH on interface $INTERFACE..."
if sudo tc qdisc add dev $INTERFACE root tbf rate $UPLOAD_BANDWIDTH burst 32kbit latency 400ms >/dev/null 2>&1; then
if tc qdisc add dev $INTERFACE root tbf rate $UPLOAD_BANDWIDTH burst 32kbit latency 400ms >/dev/null 2>&1; then
echo -e " [${GREEN}OK${NC}]"
else
echo -e " [${RED}FAIL${NC}]"
@ -64,14 +74,14 @@ apply_bandwidth_limit() {
# Function to check if the bandwidth limit is set
is_bandwidth_limit_set() {
sudo tc qdisc show dev $INTERFACE | grep -q 'tbf'
tc qdisc show dev $INTERFACE | grep -q 'tbf'
}
# Function to remove the bandwidth limit using tc if it is set
remove_bandwidth_limit() {
if is_bandwidth_limit_set; then
echo -n "Removing upload bandwidth limit on interface $INTERFACE..."
if sudo tc qdisc del dev $INTERFACE root; then
if tc qdisc del dev $INTERFACE root; then
echo -e " [${GREEN}OK${NC}]"
else
echo -e " [${RED}FAIL${NC}]"

View file

@ -127,13 +127,13 @@ services:
<<: *common-build
# Glutton
# glutton:
# image: ${TPOT_DOCKER_REPO}/glutton:${TPOT_VERSION}
## build:
# tags:
# - ${TPOT_GHCR_REPO}/glutton:${TPOT_VERSION}
# context: ../glutton/
# <<: *common-build
glutton:
image: ${TPOT_DOCKER_REPO}/glutton:${TPOT_VERSION}
build:
tags:
- ${TPOT_GHCR_REPO}/glutton:${TPOT_VERSION}
context: ../glutton/
<<: *common-build
# Go-pot
go-pot:

View file

@ -1,6 +1,6 @@
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND noninteractive
ENV ES_VER=8.14.2
ENV ES_VER=8.16.1
#
# Include dist
COPY dist/ /root/dist/

View file

@ -1,5 +1,5 @@
FROM node:20.13.1-alpine3.20
ENV KB_VER=8.14.2
FROM node:20.15.1-alpine3.20
ENV KB_VER=8.16.1
#
# Include dist
COPY dist/ /root/dist/
@ -22,8 +22,8 @@ RUN apk --no-cache -U upgrade && \
tar xvfz kibana-$KB_VER-linux-$KB_ARCH.tar.gz --strip-components=1 -C /usr/share/kibana/ && \
#
# Kibana's bundled node does not work in build pipeline
rm /usr/share/kibana/node/bin/node && \
ln -s /usr/local/bin/node /usr/share/kibana/node/bin/node && \
rm /usr/share/kibana/node/glibc-217/bin/node && \
ln -s /usr/local/bin/node /usr/share/kibana/node/glibc-217/bin/node && \
#
# Setup user, groups and configs
sed -i 's/#server.basePath: ""/server.basePath: "\/kibana"/' /usr/share/kibana/config/kibana.yml && \

View file

@ -1,6 +1,6 @@
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
ENV LS_VER=8.14.2
ENV LS_VER=8.16.1
#
# Include dist
COPY dist/ /root/dist/

View file

@ -138,7 +138,7 @@
<div class="header-container">
<div class="clock-container" id="clock"></div>
<div class="dynamic-text">T-Pot 24.04.0</div>
<div class="dynamic-text">T-Pot 24.04.1</div>
</div>
<div class="logo-container">