none
How to block INBOUND IP TRAFFIC?? RRS feed

  • Question

  • Sorry, I have created a filter with multiple condition. 

    	if(inbound)
    	{
    		filters.layerKey=FWPM_LAYER_INBOUND_TRANSPORT_V4;
    
    	
    	}
    	else
    	{
    		filters.layerKey=FWPM_LAYER_OUTBOUND_TRANSPORT_V4;
    
    
    	}
    filters.action.type=FWP_ACTION_BLOCK;
    	
    filterCondn[0].fieldKey=FWPM_CONDITION_IP_REMOTE_ADDRESS;
    
    	filterCondn[0].matchType=FWP_MATCH_EQUAL;
    	filterCondn[0].conditionValue.type=FWP_V4_ADDR_MASK;
    	filterCondn[0].conditionValue.v4AddrMask=&AddrMask[0];
    
    	
    	// Configure the receiver
    	filterCondn[1].fieldKey=FWPM_CONDITION_IP_LOCAL_ADDRESS;
    	
    	filterCondn[1].matchType=FWP_MATCH_EQUAL;
    	filterCondn[1].conditionValue.type=FWP_V4_ADDR_MASK;
    	filterCondn[1].conditionValue.v4AddrMask=&AddrMask[1];
    	
    
    	// Add filter to the engine
    	filters.numFilterConditions=2;			
    	filters.filterCondition=filterCondn;
    	try
    	{
    	
    		result=FwpmFilterAdd0(engineHandle,&filters,0,&filters.filterId);
    		
    	}
    The result=0; but not blocked. 
    And error comes as filterCondn is corrupted
    

    Please Help ASAP.


    RBN

    Monday, October 1, 2012 9:13 PM