KingKrool said:I'll give you an idea.
Windows Vista and 2008 have a filtering API and a firewall API (which itself is built on the filtering API).
Implement a filter on Windows which can accept pf/iptables rules (in short port iptables or pf to Windows using the APIs). PF is packet filter (BSD) and iptables is the Linux equivalent.
Windows Filtering Platform
About Windows Firewall API (Windows)