To determine all services connecting to the internet, enter the command below in a terminal window:
$ sudo lsof -n -P -i +c 15
<enter>
You can also find similar information using the command below:
$ sudo netstat -anp | grep e tcp e udp
<enter>