Home How to: add ipranges to iptables
Post
Cancel

How to: add ipranges to iptables

Howto add ipranges to iptables

Do you need to add an iprange to iptables?

This is how you do it:

iptables -A INPUT -p tcp --destination-port 9090 -m iprange --src-range 192.168.0.2-192.168.0.200 -j ACCEPT

Then do not forget to save it:

service iptables save

Then you need to restart the service

service iptables restart

This post is licensed under CC BY 4.0 by the author.