It depends on the ports and the services you have running on the box.
Most firewalls will allow all outgoing traffic, but only allow incoming is it's part of an established connection (i.e. a new connection on FTP will spawn a separate data channel on another port, so you want to allow the connection on that port as well as the standard FTP port), or is a new connection to a specified port.
Locking down outgoing ports is alot more difficult. Although most outgoing responses from incoming requests go out on the same port the request came in on (i.e. port 80 for HTTP), any local process that establishes an outgoing connection (i.e. outgoing SMTP request to deliver e-mail) will use a port in the upper range (>1024) to connection to port 25 on the remote server.
Mostly if you check the service for the concern port through /etc/services, we can stop that particular service. So that we cannot acces that particular port until we again restart the services. Moreover check to this given url: