From 125a3ac74f17f0cb002374a3398117cff6b121c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Krawczyk?= Date: Mon, 25 Apr 2016 17:49:52 +0100 Subject: [PATCH] add -n flag to iptables -L to prevent DNS resolution --- blacklist.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/blacklist.sh b/blacklist.sh index d4a6408..dd10cc5 100755 --- a/blacklist.sh +++ b/blacklist.sh @@ -84,15 +84,15 @@ else fi # create main blocklists chain -if ! iptables -L | grep -q "Chain ${blocklist_chain_name}"; then +if ! iptables -nL | grep -q "Chain ${blocklist_chain_name}"; then iptables -N ${blocklist_chain_name} fi # inject references to blocklist in the beginning of input and forward chains -if ! iptables -L ${INPUT} | grep -q ${blocklist_chain_name}; then +if ! iptables -nL ${INPUT} | grep -q ${blocklist_chain_name}; then iptables -I ${INPUT} 1 ${IN_OPT} -j ${blocklist_chain_name} fi -if ! iptables -L ${FORWARD} | grep -q ${blocklist_chain_name}; then +if ! iptables -nL ${FORWARD} | grep -q ${blocklist_chain_name}; then iptables -I ${FORWARD} 1 ${IN_OPT} -j ${blocklist_chain_name} fi