When nmap says filtered, that means it never received a reply from the server, presumably because the server never received the request because it was filtered. When nmap says a port is closed, that means the server sent a reply saying the connection wasn't established, presumably because there isn't a server listening on that port.
On a default ubuntu system without any firewall between it and the client, all ports will be closed. A firewall can either drop or reject the packets.
sudo iptables -A INPUT -p tcp --dport 666 -j DROP
sudo iptables -A INPUT -p tcp --dport 666 -j REJECT