I can Allow ip range by using this command:iptables -A INPUT -s 46.43.64.0/24 -j ACCEPTBut this range have another range From IP 46.43.64.0 To IP 46.43.127.255 as appear here: http://www.nirsoft.net/countryip/ps.htmlSo how can I allow all these 16384 IP in a single command?
How can I allow all these 16384 (IP range FROM & TO) IP in a single command?
iptables
Calculate the netmask, or use a tool like this Online IP CIDR calculator if you don't have the time to do the math, neither you have memorized that 16384 addresses is equivalent to a /18 network. Feed this tool with the number of hosts(16384) and the network ip address(46.43.64.0) and you will have the mask: 255.255.192.0 or 46.43.64.0/18 on net CIDR notation. Now, change your iptables rule to reflect this bigger net:iptables -A INPUT -s 46.43.64.0/18 -j ACCEPTUsing this CIDR notation on your rules, you can allow broader networks as you will, instead of listing all /24 networks that integrate this wider mask.Another way to do this, is to make a rule based on src-range. iptables -A INPUT -m iprange --src-range 46.43.64.0-46.43.127.255 -j ACCEPTI don't know how this approach would impact performance of filtering so, i would take the first option