Quote:
Originally Posted by lolmannz
Hi there, I'm just wondering how would one allow outgoing / incoming traffic from specific IP/domain range while blocking the rest using IPtables or similar firewalls?
Some examples of the rules would be high appreciated.
Thanks in advance
|
You could achieve this by executing a single command such as, for example:
Code:
iptables -I INPUT -i eth0 -m iprange ! --src-range 217.98.46.100-217.98.56.235 -j DROP
After executing that command, any packets which hit the
eth0 interface and don't have a source address between 217.98.46.100 and 217.98.56.235 will be filtered.