diff --git a/ipacm/inc/IPACM_Iface.h b/ipacm/inc/IPACM_Iface.h
index 52616e6..d0ba6cc 100644
--- a/ipacm/inc/IPACM_Iface.h
+++ b/ipacm/inc/IPACM_Iface.h
@@ -120,21 +120,23 @@
     /*Query the IPA endpoint property */
     int query_iface_property(void);
 
-		/*Configure the initial filter rules */
-		virtual int init_fl_rule(ipa_ip_type iptype);
+	/*Configure the initial filter rules */
+	virtual int init_fl_rule(ipa_ip_type iptype);
 
-		static IPACM_Routing m_routing;
-		static IPACM_Filtering m_filtering;
-		static IPACM_Header m_header;
+	static IPACM_Routing m_routing;
+	static IPACM_Filtering m_filtering;
+	static IPACM_Header m_header;
 
-		/* software routing enable */
-		virtual int handle_software_routing_enable(void);
+	/* software routing enable */
+	virtual int handle_software_routing_enable(void);
 
-		/* software routing disable */
-		virtual int handle_software_routing_disable(void);
+	/* software routing disable */
+	virtual int handle_software_routing_disable(void);
 
 	/* used to get filtering rule index in table */
-	int flt_rule_count;
+	int flt_rule_count_v4;
+	
+	int flt_rule_count_v6;
 
 
 private:
diff --git a/ipacm/src/IPACM_Iface.cpp b/ipacm/src/IPACM_Iface.cpp
index ecb78d9..af31028 100644
--- a/ipacm/src/IPACM_Iface.cpp
+++ b/ipacm/src/IPACM_Iface.cpp
@@ -76,7 +76,8 @@
 	memset(software_routing_fl_rule_hdl, 0, sizeof(software_routing_fl_rule_hdl));
 	memset(ipv6_addr, 0, sizeof(ipv6_addr));
 
-	flt_rule_count = 0;
+	flt_rule_count_v4 = 0;
+	flt_rule_count_v6 = 0;
 	query_iface_property();
 	IPACMDBG(" create iface-index(%d) constructor\n", ipa_if_num);
 	return;
@@ -666,7 +667,7 @@
 		}
 		else
 		{
-			flt_rule_count += IPV4_DEFAULT_FILTERTING_RULES;
+			flt_rule_count_v4 += IPV4_DEFAULT_FILTERTING_RULES;
 			/* copy filter hdls */
 			for (int i = 0; i < IPV4_DEFAULT_FILTERTING_RULES; i++)
 			{
@@ -754,7 +755,7 @@
 		}
 		else
 		{
-			flt_rule_count += IPV6_DEFAULT_FILTERTING_RULES;
+			flt_rule_count_v6 += IPV6_DEFAULT_FILTERTING_RULES;
 			/* copy filter hdls */
 			for (int i = 0;
 					 i < IPV6_DEFAULT_FILTERTING_RULES;
diff --git a/ipacm/src/IPACM_Lan.cpp b/ipacm/src/IPACM_Lan.cpp
index 9e189d5..8824d99 100644
--- a/ipacm/src/IPACM_Lan.cpp
+++ b/ipacm/src/IPACM_Lan.cpp
@@ -870,6 +870,8 @@
 		return IPACM_FAILURE;
 	}
 
+	flt_rule_count_v4 = IPV4_DEFAULT_FILTERTING_RULES + IPACM_Iface::ipacmcfg->ipa_num_private_subnet;
+	
 	if(is_sta_mode == false)
 	{
 		if (m_filtering.DeleteFilteringHdls(wan_ul_fl_rule_hdl_v4, 
@@ -1145,10 +1147,11 @@
 			return IPACM_FAILURE;
 		}
 
+		flt_rule_count_v4 += IPACM_Iface::ipacmcfg->ipa_num_private_subnet;
+		
 		/* copy filter rule hdls */
 		for (i = 0; i < IPACM_Iface::ipacmcfg->ipa_num_private_subnet; i++)
 		{
-
 			private_fl_rule_hdl[i] = m_pFilteringTable->rules[i].flt_rule_hdl;
 		}
 		free(m_pFilteringTable);
@@ -1581,12 +1584,19 @@
 		flt_rule_entry.rule.rt_tbl_idx = prop->prop[cnt].rt_tbl_idx;
 		memcpy(&pFilteringTable->rules[cnt], &flt_rule_entry, sizeof(flt_rule_entry));
 
-		flt_index.filter_index_list[cnt].filter_index = flt_rule_count;
+		if(iptype == IPA_IP_v4)
+		{
+			IPACMDBG("Filtering rule %d has index %d\n", cnt, flt_rule_count_v4);
+			flt_index.filter_index_list[cnt].filter_index = flt_rule_count_v4;
+			flt_rule_count_v4++;
+		}
+		if(iptype == IPA_IP_v6)
+		{
+			IPACMDBG("Filtering rule %d has index %d\n", cnt, flt_rule_count_v6);
+			flt_index.filter_index_list[cnt].filter_index = flt_rule_count_v6;
+			flt_rule_count_v6++;
+		}
 		flt_index.filter_index_list[cnt].filter_handle = prop->prop[cnt].filter_hdl;
-		
-		IPACMDBG("Filtering rule %d, index %d\n", cnt, flt_index.filter_index_list[cnt].filter_index);
-
-		flt_rule_count++;
 	}
 
 	if(false == m_filtering.SendFilteringRuleIndex(&flt_index))
@@ -1645,6 +1655,8 @@
 		return IPACM_FAILURE;
 	}
 
+	flt_rule_count_v6 = IPV6_DEFAULT_FILTERTING_RULES;
+	
 	if(is_sta_mode == false)
 	{
 		if (m_filtering.DeleteFilteringHdls(wan_ul_fl_rule_hdl_v6, 
