Go to the/etc/sysconfig/directory and run the vi command to edit the SuSEfirewall2 file.-> # vi SuSEfirewall2: Find FW_SERVICES_EXT_TCP in the file, add a service name or port corresponding to the service, for example, SSH, FW_SERVICES_EXT_TCP = "ssh" or FW_SERVICES_EXT_TCP = "22". Separate multiple ports with spaces; save www.2cto.com and exit. Ii. restart the firewall for the configuration to take effect.-> # rcSuSEfirewall2 restart [if you still cannot access ssh or telnet port 22, next, proceed to the following steps: # chkconfig SuSEfirewall2_setup off # The system does not load firewall rules by default at startup # iptables-t filter-I input_ext-p tcp-dport 22-j ACCEPT # add an sshd access rule www.2cto.com # iptables-save>/root/iptables. save # save the new iptables rule # vi/etc/init. d/boot. localiptables-restore/root/iptables. save # Add a command to enable automatic recovery at system startup
Previously saved firewall rules .... In this way, OK