How to create different Firewall Rules on different Interfaces in Windows XP OS Programmatically?

You want to create different exception rules on different interfaces on an XP Based operating system programmatically. Is there any API's

that exists to accomplish this?

You can use the INetSharingPortMapping ( and  INetSharingPortMappingCollection ( ) using the same number for both ports, to open a hole in the firewall on a specific interface. Note: this only applies for XP.

-Balajee P

Windows SDK

Skip to main content