I am trying to white list CloudFlare's IP addresses on my server by issuing these:
iptables -N whitelist
iptables -A whitelist -s 204.93.177.0/24 -j ACCEPT
iptables -A whitelist -s 199.27.128.0/21 -j ACCEPT
iptables -A whitelist -s 173.245.48.0/20 -j ACCEPT
iptables -A whitelist -s 103.22.200.0/22 -j ACCEPT
iptables -A whitelist -s 141.101.64.0/18 -j ACCEPT
iptables -A whitelist -s 108.162.192.0/18 -j ACCEPT
and when I type: iptables -L
I see:
Chain whitelist (0 references)
target prot opt source destination
ACCEPT all -- network/24 anywhere
ACCEPT all -- 199.27.128.0/21 anywhere
ACCEPT all -- 173.245.48.0/20 anywhere
ACCEPT all -- 103.22.200.0/22 anywhere
ACCEPT all -- 141.101.64.0/18 anywhere
ACCEPT all -- 108.162.192.0/18 anywhere
then I restart iptables by doing service iptables restart
. However, nothing changed and it didn't white list those IPs :( Am I missing something?