@@ -251,7 +251,7 @@ ban_incoming_and_outgoing()
251251 # Strip port and [ ] brackets
252252 sed -E " s/\\ [//g; s/\\ ]//g; s/:[0-9]+$//g" | \
253253 # Only leave non whitelisted, we add ::1 to ensure -v works for ipv6
254- grepcidr -v -e " $SERVER_IP_LIST $whitelist ::1" | \
254+ grepcidr -v -e " $SERVER_IP_LIST $whitelist ::1" 2> /dev/null | \
255255 # Sort addresses for uniq to work correctly
256256 sort | \
257257 # Group same occurrences of ip and prepend amount of occurences found
@@ -319,7 +319,7 @@ ban_only_incoming()
319319 # Strip port and [ ] brackets
320320 sed -E " s/\\ [//g; s/\\ ]//g; s/:[0-9]+$//g" | \
321321 # Only leave non whitelisted, we add ::1 to ensure -v works
322- grepcidr -v -e " $SERVER_IP_LIST $whitelist ::1" | \
322+ grepcidr -v -e " $SERVER_IP_LIST $whitelist ::1" 2> /dev/null | \
323323 # Sort addresses for uniq to work correctly
324324 sort | \
325325 # Group same occurrences of ip and prepend amount of occurences found
@@ -447,7 +447,7 @@ view_connections()
447447 # Sort addresses for uniq to work correctly
448448 sort | \
449449 # Only leave non whitelisted
450- grepcidr -v -e " $SERVER_IP_LIST $whitelist " | \
450+ grepcidr -v -e " $SERVER_IP_LIST $whitelist " 2> /dev/null | \
451451 # Group same occurrences of ip and prepend amount of occurences found
452452 uniq -c | \
453453 # Numerical sort in reverse order
@@ -464,7 +464,7 @@ view_connections()
464464 # Sort addresses for uniq to work correctly
465465 sort | \
466466 # Only leave non whitelisted, we add ::1 to ensure -v works
467- grepcidr -v -e " $SERVER_IP_LIST $whitelist ::1" | \
467+ grepcidr -v -e " $SERVER_IP_LIST $whitelist ::1" 2> /dev/null | \
468468 # Group same occurrences of ip and prepend amount of occurences found
469469 uniq -c | \
470470 # Numerical sort in reverse order
@@ -499,7 +499,7 @@ view_connections_port()
499499 # Sort addresses for uniq to work correctly
500500 sort | \
501501 # Only leave non whitelisted
502- grepcidr -v -e " $SERVER_IP_LIST $whitelist " | \
502+ grepcidr -v -e " $SERVER_IP_LIST $whitelist " 2> /dev/null | \
503503 # Group same occurrences of ip and prepend amount of occurences found
504504 uniq -c | \
505505 # Numerical sort in reverse order
@@ -516,7 +516,7 @@ view_connections_port()
516516 # Sort addresses for uniq to work correctly
517517 sort | \
518518 # Only leave non whitelisted, we add ::1 to ensure -v works
519- grepcidr -v -e " $SERVER_IP_LIST $whitelist ::1" | \
519+ grepcidr -v -e " $SERVER_IP_LIST $whitelist ::1" 2> /dev/null | \
520520 # Group same occurrences of ip and prepend amount of occurences found
521521 uniq -c | \
522522 # Numerical sort in reverse order
0 commit comments