I can't find an answered question for this problem.
I have about 7 ranges of IP address i would like to allow to RDP(port 3389) to a a server within my network.
My main router uses iptables and i cant seem to figure out what the right combination is ...
this is the closest i've gotten which doesnt seem to work
iptables -t filter -l FORWARD -d 192.168.x.xx -p tcp -m iprange --src-range xx.xxx.xxx.100-xxx.xxx.xxx.200 --dport 3389 -j ACCEPT
What is the correct way of doing this...
UPDATE:
I have found a solution to the problem. Please see answer below for my solution
-m iprange --src-rangefor that.iptables v1.4.21: iprange: option "--src-range" can only be used once.– Michal Sokolowski Jun 27 '16 at 22:08iptables -t filter -A INPUT -s 192.168.1.0/28,192.168.1.8/31,192.168.1.10/32 -p tcp --dport 3389 -j ACCEPT, but chains are better for this. – Michal Sokolowski Jun 27 '16 at 22:14