Struggling here to get both IPs in my arr1 to be blocked going to the URLs listed in arr2 In the future, I'd like to expand arr1 to add more IPs if needed.
Can someone please assist with my code below? Thanks in advance.
#!/bin/sh
arr1="192.168.1.12 192.168.1.14"
arr2="facebook.com twitter.com linkedin.com tumblr.com instagram.com"
for ((i=0;i<${#arr1[@]};++i)); do
for DOMAIN in $arr2; do
echo "-I FORWARD -p tcp -s "$arr" --dport 443 -m string --string "$DOMAIN" --algo bm --to 65535 -j DROP"
done
done
exit
Can someone please assist with my code below? Thanks in advance.
#!/bin/sh
arr1="192.168.1.12 192.168.1.14"
arr2="facebook.com twitter.com linkedin.com tumblr.com instagram.com"
for ((i=0;i<${#arr1[@]};++i)); do
for DOMAIN in $arr2; do
echo "-I FORWARD -p tcp -s "$arr" --dport 443 -m string --string "$DOMAIN" --algo bm --to 65535 -j DROP"
done
done
exit