I have changed ssh default port to 2020, And add iptable rule in order to allow incoming traffic on that port using below command.
iptables -A INPUT -p tcp -m tcp --dport 2020 -j ACCEPT
And i would like to block all other ports on the server. And use below command after allowing ssh. All session are closed. How can i fix it.
iptables -P INPUT DROP
iptables -P OUTPUT DROP