-3

Is there a way I can allow a range of ports to only be used by one IP address but one? Thanks.

Precisely, I want to restrict range 6011-6099 excluding 6012. The rule to restrict the range 6011-6099 is already in place.

Oh, it's worth mentioning that I'm using IPTables as the firewall. (lawl)

1 Answer 1

4

Yes.

iptables -A INPUT-p tcp --dport 6012 -j DROP

Add this first to block any traffic to port 6012.

iptables -A INPUT -p tcp -s 10.10.10.10 --match multiport --dport 6011:6099 -j ACCEPT

where 10.10.10.10 is the source IP. This tells the system to let input coming from 10.10.10.10 destined for any port 6011-6099 through.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .