I want to limit source port range in my ubuntu machine upto 20000 , that means no Application should be able to use port higher than that.I have this command in mind
iptables -A OUTPUT -p tcp --sport 20001:65535 --dport 20001:65535 -j DROP
But , wouldn't this drop all packets rather than limiting ? I need a configuration such that I can still browse the web , just not through port 20001 to 65535 . No incoming or outgoing through this ports.