Iptables - allow traffic from entire 10.x.x.x
You can simply write this:
iptables -I INPUT -s 10.0.0.0/8 -p tcp --dport 80 -j ACCEPT
Source and destination rules accept CIDR notation. Also, -m tcp
is usually implicit (though including it is harmless), and -s
is acceptable shorthand for --src
.