Block an IP for a subnet by iptables

Hi
I am looking to block an incomming IP for all the subnet in lab area. Only single Ip from Lab should be access to this incomming IP.

Block IP=10.20.50.xx
Subnet=10.30.40.xx
............................
...........................
Subnet=10.40.50.xx

can anyone explain how to do this by linux Iptables?

Thanks in Advance

Although I've not used this yet, but will be doing so shortly, I would think that the logic should be to deny everything as default then just allow what you want to come in.

Robin

iptables -A INPUT -s 10.20.50.0/24 -j DROP