Linux curl command fails to connect

Asked 2 years ago, Updated 2 years ago, 53 views

The following error occurs in the Curl command:I don't know why because ping is passed.

(7) Failed connect to x.x.x.x:80; no route to host

The situation is as follows.Could someone please tell me?

C Deploy 3 Centos 7.Addresses and the following:
Server A: 10.40.7.33/24ens224
Server B: 10.40.7.34/24ens224
Server C: 10.40.7.35/24ens224

PPing communication can communicate with each other.There is no problem with the speed.

cYou can access your own server with the curl command/firefox.
(For example, server A can access 10.40.7.33 successfully by issuing the curl command.)
 
④All SE Linux are temporarily in permanent mode.

centos

2022-09-29 22:40

2 Answers

The difference between firewalled and SELinux has changed the subject.

These two are completely different.Different layers work.
firewalled is for networks (only).For example, you might want to keep a specific port closed or access a specific port limited to the source.

SELinux manages access control for applications, processes, and files.

誤解 Without fear of misunderstanding, firewall controls each NIC and SELinux controls the OS resources themselves.

There are more samples and explanations to learn more about how the web server works

The following other sites are helpful.

https://qiita.com/chi9rin/items/af532d0dd9237cc65741
https://www.redhat.com/ja/topics/linux/what-is-selinux


2022-09-29 22:40

The problem was firewalled.I thought SE Linux (=setenforce0) = firewalled, but the recognition was incorrect.Could someone please supplement this difference?


2022-09-29 22:40

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.