Yep, thereOpenSnitch is one though it's not available in most Linuxes out of the boxa GNU/Linux application firewall:
https://github.com/evilsocket/opensnitch
Douane personal firewall for GNU/Linux:
You could also check
firejailwhich allows to specify network restrictions: https://firejail.wordpress.com/documentation-2/basic-usage/#networking