how to allow range ip

Post Reply
motamedi
Junior Member
Posts: 3
Joined: 11 Feb 2016, 09:35

how to allow range ip

Post by motamedi »

hello

how to allow range ip in csf ?

example 192.168.100.1/255

thanks ...
munkitkat

Re: how to allow range ip

Post 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
Post Reply