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
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
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.
LOG
in particular will not terminate processing of the rules.ACCEPT
,DROP
,REJECT
of course will. – ilkkachu Jun 25 '20 at 07:36