summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2012-01-14 20:55:27 +0000
committererdgeist <erdgeist@erdgeist.org>2012-01-14 20:55:27 +0000
commit3095bd59001b14b87515c9cc87e0e87e0694f17e (patch)
tree0680e374d505708295038c0641a978a09679b656
parentcea94f977ddbc4964c2d20927cf287807377bc7f (diff)
Test for locally configured IP addresses by trying to bind nc to it. Thanks to Thomas Steen Rasmussen and #bsdports
-rwxr-xr-xezjail-admin2
1 files changed, 1 insertions, 1 deletions
diff --git a/ezjail-admin b/ezjail-admin
index 1748436..4b7bd35 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -708,7 +708,7 @@ EOF
708 TIFS=${IFS}; IFS=, 708 TIFS=${IFS}; IFS=,
709 for ezjail_ip in ${ezjail_ips}; do 709 for ezjail_ip in ${ezjail_ips}; do
710 # check, whether IP is configured on a local interface, warn if it isnt 710 # check, whether IP is configured on a local interface, warn if it isnt
711 ping -c 1 -m 1 -t 1 -q ${ezjail_ip} > /dev/null 711 nc -n -s ${ezjail_ip} -u -w 0 127.0.0.1 1 2> /dev/null
712 [ $? -eq 0 ] || echo "Warning: IP ${ezjail_ip} not configured on a local interface." 712 [ $? -eq 0 ] || echo "Warning: IP ${ezjail_ip} not configured on a local interface."
713 713
714 # check, whether some host system services do listen on the Jails IP 714 # check, whether some host system services do listen on the Jails IP