Hello I want to allow only ports 25 and 80 and all other ports to be closed. I tried to configure my Ubuntu linux, but I dropped all the ports...
sudo iptables -F
sudo iptables -P OUTPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P INPUT DROP
sudo iptables -A INPUT -p tcp -m tcp --sport 25 -j ACCEPT
sudo iptables -A INPUT -p tcp -m tcp --sport 80 -j ACCEPT