You CAN do this with the standard W7 firewall.
However, you will need to familiarise yourself with creating custom firewall settings. You need to create two inbound custom rules. Rules are processed in order:
- First rule is to ALLOW inbound access from a set of IP addresses. The custom firewall rules dialog allows you to add as many as you like
- The second rule is to BLOCK inbound access from ALL IP addresses.
The first rule takes preference so between them, this should work. I'm afraid I don't have a setup to test this just now. Type "firewall" into the start menu to find the firewall settings application. Then create custom rules as described.
Just make careful notes on what you did so that you can delete the rules if things go wrong and make sure that you test the rules by trying to access your PC from both an allowed and a non-allowed PC.