Page 1 of 1

how to allow range ip

Posted: 08 Mar 2016, 16:10
by motamedi
hello

how to allow range ip in csf ?

example 192.168.100.1/255

thanks ...

Re: how to allow range ip

Posted: 09 Mar 2016, 07:41
by munkitkat
If you only want to allow a certain range of IP addresses inside of 10.50.0.0 (such as from 10.50.10.20 through 10.50.10.80) you can use the following command:

iptables -A INPUT -i eth1 -m iprange --src-range 10.50.10.20-10.50.10.80 -j ACCEPT
If you want to allow the entire range you can use this instead:

iptables -A INPUT -i eth1 -s 10.50.0.0/16 -j ACCEPT