mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 08:42:33 +01:00
Merge pull request #225 from andreasstieger/netstat
2.17: correct netstat usage and filtering
This commit is contained in:
commit
260a3a76f1
1 changed files with 1 additions and 1 deletions
|
@ -204,7 +204,7 @@ fi
|
||||||
# 2.17
|
# 2.17
|
||||||
check_2_17="2.17 - Bind swarm services to a specific host interface"
|
check_2_17="2.17 - Bind swarm services to a specific host interface"
|
||||||
if docker info 2>/dev/null | grep -e "Swarm:*\sactive\s*" >/dev/null 2>&1; then
|
if docker info 2>/dev/null | grep -e "Swarm:*\sactive\s*" >/dev/null 2>&1; then
|
||||||
netstat -lt | grep -e '\[::]:2377' -e '*:2377' -e '0.0.0.0:2377' >/dev/null 2>&1
|
netstat -lnt | grep -e '\[::]:2377 ' -e ':::2377' -e '*:2377 ' -e ' 0\.0\.0\.0:2377 ' >/dev/null 2>&1
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -eq 1 ]; then
|
||||||
pass "$check_2_17"
|
pass "$check_2_17"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue