Abrir puertos en CentOS

 to add the firewall rules, we can be found in:
/ etc / sysconfig / iptables 

You can edit this file to define our rules.

For example if we want to open the SSH port (22):

  1. Open the file iptables
     nano / etc / sysconfig / iptables 
  2. We look for the line containing
     [0: 0] -A RH-Firewall-1-INPUT -j ACCEPT -i what 

    and give it a ENTER

  3. We write
     [0: 0] -A RH-Firewall-1-INPUT -p tcp -j ACCEPT --dport 21 
  4. Save the file with CTRL + O and close it with CTRL + X
  5. Restart the service
     service iptables  restart  

¿ha servido de ayuda este artículo?

mood_bad No me gusta 0
mood Me gusta 3
visibility Veces visto: 13120