1. ホーム
  2. Qt

curl はホストに接続できませんでした 接続を拒否されました

2022-03-01 21:47:04
1, first ping to see if you can pass
2、If the ping goes through, the most likely reason is that the port you want to access is blocked by the firewall
Firewall to add allow through ports: 1.
1、sudo /etc/init.d/iptables status
      Check the port opening status
2. sudo vi /etc/sysconfig/iptables
     Add the ports allowed through the firewall
     -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT # Allow port 3306 to pass through the firewall
     Special note.
     Many people add these two rules to the last line of the firewall configuration or other locations, resulting in an invalid configuration, or unsuccessful, the correct one should be added to the default port 22 under this rule
3, sudo service iptables restart restart effective


おすすめです。  Floating Lifeのブログ