Figuring out what IP's and Ports a program is accessing
There is

lsof -i


and 

netstat -n


just to name few of Terminal commands to look who is using the Internet.

Those are information only, and will not block anything.