From d1cebc658174a16014c2a3847bdf55bb3553b7fb Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 7 Feb 2026 19:58:55 +0800 Subject: more robust for ssh floods --- start_container.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'start_container.sh') diff --git a/start_container.sh b/start_container.sh index 25fcb10..2299390 100755 --- a/start_container.sh +++ b/start_container.sh @@ -33,6 +33,7 @@ podman run -d \ --network ${NETWORK} \ --ip ${PRIVATE_IP} \ --cap-add=NET_ADMIN \ + --pids-limit=100 \ --env-file "$(dirname "$0")/config.env" \ -v ${CONTAINER_NAME}_data:/data \ -v /git:/git \ @@ -40,6 +41,7 @@ podman run -d \ # Setup public IP sleep 2 +# Get the container's network interface name (e.g. eth0) IFACE=$(podman exec ${CONTAINER_NAME} sh -c "ip -o link | grep -v lo | head -1 | cut -d: -f2 | tr -d ' ' | cut -d@ -f1") podman exec ${CONTAINER_NAME} ip addr add ${PUBLIC_IP}/32 dev ${IFACE} ip route add ${PUBLIC_IP}/32 via ${PRIVATE_IP} -- cgit