FreeBSD/scripts/find-sonewconn.sh
Sharad Ahlawat 90c5709862 .
2021-04-01 01:23:14 -07:00

17 lines
367 B
Bash
Executable File

#!/usr/local/bin/bash
# Copyright (c) 2018-2021, diyIT.org
# All rights reserved.
#
# BSD 2-Clause License ("Simplified BSD License" or "FreeBSD License")
# https://diyit.org/license/
#
#
for jail in $(jls -h name | tail +2); do
sudo jexec $jail netstat -LAan 2>/dev/null | grep -q $1;
if [ $? -eq 0 ]; then
echo "found in jail $jail";
fi;
done