For present state of network & connections(on your localbox)..
Code:
netstat -plant //for tcp
netstat -planu //for udp
For checking open ports(for local as well any other box connected)
Code:
nmap -P0 -sT -v host-ip/name
Note : Firewall is a way to block ports/connections & shutting down the services is a way of close them.