If you are trying to use netcat on CentOS7 and see the following:
Netcat: Connection Refused
Don’t fret, this is because CentOS7 has firewalld on by default.
Stop firewalld by doing
systemctl stop firewalld
Check here for more info. http://www.liquidweb.com/kb/how-to-stop-and-disable-firewalld-on-centos-7/
The “correct” way though, is to leave the firewall on , and only add the services that you want into the firewalld “zone” that you are using. See here for more information. http://www.tecmint.com/configure-firewalld-in-centos-7/