From dc0c6291078a4b231b9e67a90c2c45ccbf449bc5 Mon Sep 17 00:00:00 2001 From: Chai Feng Date: Wed, 3 Oct 2018 14:31:52 +0800 Subject: [PATCH] Adding rules may not including port number --- ufw-docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ufw-docker b/ufw-docker index 6e5f7f5..663b840 100755 --- a/ufw-docker +++ b/ufw-docker @@ -22,7 +22,7 @@ function ufw-docker--list() { INSTANCE_PORT="[[:digit:]]\\+" PROTO="\\(tcp\\|udp\\)" fi - ufw status numbered | grep "# allow ${INSTANCE_NAME} ${INSTANCE_PORT}\\/${PROTO}\$" + ufw status numbered | grep "# allow ${INSTANCE_NAME}\\( ${INSTANCE_PORT}\\/${PROTO}\\)\\?\$" } function ufw-docker--list-number() {