Let me clarify: I have an iMac wich is wireless connected to the router from the ISP.The CentOS computer is connected to the iMac with a cable and internet sharing is turned on.Installed nginx on the CentOS but I can not get access to it from my iMac.If I run curl 192.168.3.2 I get connection refusedOn my CentOS wget 192.168.2.3 is working, because I get the index page from the iMac server running Apache.Is CentOS running a firewall?EDITfor the moment I turned off iptables and I can connect, but what I would like to ask now is how to set a rule to allow incoming requests. 
configure iptables to accept incoming requests
centos;networking;iptables
I would like to ask now is how to set a rule to allow incoming requests.The easiest way to do that is probably to edit the iptables rules.  On CentOS they are probably in /etc/sysconfig/iptables.  Make a backup copy of that before you start -- just cp iptables iptables.bk.  You will need superuser permissions to access the file, so su root before you do all this.The file hopefully has comments in it explaining the purpose of various rules; you might look through those to see if there is a line you can uncomment to allow for an HTTP server.  If not, add at the top:-A INPUT -p tcp --dport 80 -m state --state NEW -j ACCEPTHopefully that's enough (if you've used the net at all otherwise with the firewall up, it should be), presuming you are using the normal HTTP port (80).Now you can restart iptables.  If your CentOS uses systemd, systemctl restart iptables, otherwise service iptables restart.If there's a problem try iptables-restore < /etc/sysconfig/iptables, that will give you a more informative error.