solution

  1. Recently double 11 visit the official website of western digital to see if there is any server discount, found that you can apply for a one yuan SSL certificate for a whole year, immediately heartbeat order, think I can also usehttpsPut on the X ha ha
  2. However, after the certificate is deployed and the nginx agent is adjusted to point to the initial portPort 443When, suddenly found that personal site access to a little strange
  3. However, don’t panic when you encounter problems. Check the running status of the server first and everything is OK. Then check whether you can ping through my IP address and domain name
  4. Strangely enough, I didn’t notice that my firewall port was only open to the original port, but not until my brain turned aroundPort 443Oh, what am I doing
  5. Then, in/etc/sysconfig/iptablesOpen in filePort 443, restart the firewall, OK, the web access is normal
  6. In conclusion, I am a big idiot

Start the flow for port 443

  1. cd /etc/sysconfigGo to the directory and check to see if it is storediptablesfile
  2. vim iptablesuseVim editorModify theiptablesFile, pressiEnter edit mode
  3. Add it below the initial port line-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT, opening port 443
  4. service iptables restartRestart the firewall.

Liunx firewall command

Linux consists of the old iptables firewall and the new Firewall firewall

The iptables firewall

  1. Checking the Firewall Statusservice iptables status
  2. Stopping the Firewallservice iptables stop
  3. Start the firewallservice iptables start
  4. Restarting the Firewallservice iptables restart
  5. Permanently Disable the Firewallchkconfig iptables off
  6. Disable the firewall permanently and restart itchkconfig iptables on

Firewall firewall

  1. Check the firewall service statussystemctl status firewalld
  2. Checking the Firewall Statusfirewall-cmd --state
  3. Stopping the Firewallservice firewalld stop
  4. Start the firewallservice firewalld start
  5. Restarting the Firewallservice firewalld restart
  6. Viewing Firewall Rulesfirewall-cmd --list-all
  7. Check whether port 80 is openfirewall-cmd --query-port=80/tcp
  8. Opening port 80firewall-cmd --permanent --add-port=80/tcp
  9. Removing Port 80firewall-cmd --permanent --remove-port=80/tcp
  10. Both opening and removing ports are modifications to the configuration file that require a firewall restart, as shown below8/9Parses parameters in the command
    • firewall-cmdlinuxProvided operationsfirewallA tool of
    • --permanentThe value is set to persistent
    • --add-portIndicates the added port

I’m FX67ll.com. If you find anything wrong with this article, please comment on it in the comments section. Thank you for reading! If you like this article, welcome to visit my github warehouse address, for me to click a Star, Thanks~ 🙂 forward please note the reference article address, very thank you!!