2) Packet dropping program. Modify the rulesets in a config file to drop any incoming or outgoing packet. These rulesets may state that all incoming packets from such a range should be dropped. Or only packets from such a range should be allowed. Or only these ports are to be open - or closed. Or only these ports may be connected out to - or specifically block these ports. These rulesets may be used to drop all UDP and/or ICMP packets. You may add custom rulesets for advanced users which specify if this offset within a packet contains this value then drop it - or if it doesn't - allow it.
I've never heard of such a utility existing, but it would be hella cool. Unfortunately, it requires a lot of work too.
Itsn't that a firewall you're making, like a winbased Ipchain kinda prog.
Well the firewall I use (software-wise) is called Look'n stop and does exactly what you say above.