Search code examples
firewallpacketiptables

Need Packet filtering and packet editing api for windows


As the title says, i need a packet filtering (Firewall) and packet editing API for windows

I did a lot of google search and find some packet filtering API like

1.Winpcap 2.WIPFW 3.Pktfilter

but nothing for packet editing, seems like i have to write a kernel level driver to achieve this...I know some programming but dont know how to program a driver

I know that i can do this in linux using iptables.

is there is anything equivalent to iptable in windows? is there is any API for windows to do packet filtering (Firewall) and editing the packet?

(basically i trying to edit the source ip in packet's ip header so that i can make the packets to use different network interface)

I don't want to write any kernel level driver for that because i don't know how to do that.

Somebody help me.


Solution

  • From XP onwards, Windows has come with a firewall.

    XP, 2k & 2k3 can be configured on the cli using "netsh firewall ...." and on later versions of Windows, it's "netsh advfirewall ....".

    Here's a link with an intro - http://blog.commandlinekungfu.com/2009/05/episode-30-twiddling-with-firewall.html.

    You could write a powershell script also to integrate with the Windows firewall. Here's some sample configuration http://blogs.technet.com/b/jamesone/archive/2009/02/18/how-to-manage-the-windows-firewall-settings-with-powershell.aspx