I've mentioned this before. You can't shutdown a port per se. You either block access to it or ensure that the application bound to the said port is killed. Remember, I can have port 80 open on my firewall and have nothing running on my system bound to port 80. While this is not a 100% good idea because if someone has exploited your system by say rooting an application running on another port (say XYZ application running on port 2000, which was allowed by firewall), she may be able to run a terminal on port 80 and have more fun with your system.
Point in case is that network ports are similar to physical ports (like USB, PS/2) only upto an extent. If someone sends a network packet to a network port that has nothing listening, the RFC for TCP/IP states that the OS must reply with a RST (rest) packet. In the case of physical ports, four pegs later, one might decided to repeatedly to plug in a USB device the wrong way and end up breaking damaging the pins.