I am restricting the traffic to specific port number using the below firewall rule.
“/sbin/iptables -A INPUT -p tcp --destination-port <port_num> -j DROP"DROP
After sometime i want to allow traffic, so adding the below firewall rule.
“/sbin/iptables -A INPUT -p tcp --destination-port <port_num> -j ACCEPT”ACCEPT
Is it correct or i have to delete the first rule before adding the second. if i dont delete the first rule,both rules are present in the INPUT chain. so which one is considered ? This is in CentOS7, Looking forward for your advise.