Bonjour à tous, je suis dans une merde noire avec Centos8, je m'explique,
je tourne 3 machines virtuelles sur des réseaux virtuels dont centos est le routeur firewall, DNS et DHCP serveur.
Centos est relié en NAT sur ma machine hôte, le DNS, le DHCP fonctionne correctement avec le firewall activé, je résoud bien des noms
de domaines comme google.com etc, je joins bien en ping 8.8.8.8, depuis mes machines clientes, mais dès que je fais une requête http/https depuis
firefox par exemple, je suis automatiquement rejeté par le parefeu
Cela fait des mois que je cherche je suis à bout de tests pour trouver la solution à ce problème ...
-------------------------------------------------------
Voici le réseau de mes machines :
-------------------------------------------------------
nakedeb
| Adapter 2 : enp0s8 : 192.168.10.20/24
|
| network vboxnet0 192.168.10.0/24
|
| Adapter 2 : enp0s8 : 192.168.10.30/24
centos8
| Adapter 3 : enp0s9 : 192.168.20.31/24
|
| network vboxnet1 192.168.20.0/24
|
| Adapter 2 : enp0s8 : 192.168.20.40/24
xubuntu
-------------------------------------------------------
Voici le parefeu de centos
-------------------------------------------------------
## Firewall Centos :
### Not running firewalld
sudo systemctl stop firewalld
### Reset firewalld
sudo rm -rf /etc/firewalld/zones/*
### Running firewalld
sudo systemctl enable firewalld
sudo systemctl start firewalld
### Public zone config
sudo firewall-cmd --permanent --zone=public --add-interface=enp0s3
sudo firewall-cmd --permanent --zone=public --add-interface=enp0s8
sudo firewall-cmd --permanent --zone=public --add-interface=enp0s9
sudo firewall-cmd --permanent --zone=public --add-masquerade
sudo firewall-cmd --permanent --zone=public --remove-service=ssh
sudo firewall-cmd --permanent --zone=public --set-target=DROP
### nakedeb zone config
sudo firewall-cmd --permanent --new-zone=nakedeb
sudo firewall-cmd --permanent --zone=nakedeb --add-source=192.168.10.20/32
sudo firewall-cmd --permanent --zone=nakedeb --add-source=192.168.10.30/32
sudo firewall-cmd --permanent --zone=nakedeb --set-target=DROP
sudo firewall-cmd --permanent --zone=nakedeb --add-icmp-block=echo-request
sudo firewall-cmd --permanent --zone=nakedeb --add-icmp-block=echo-reply
sudo firewall-cmd --permanent --zone=nakedeb --add-icmp-block-inversion
sudo firewall-cmd --permanent --zone=nakedeb --add-service=ssh
sudo firewall-cmd --permanent --zone=nakedeb --add-service=dns
sudo firewall-cmd --permanent --zone=nakedeb --add-service=dhcp
sudo firewall-cmd --permanent --zone=nakedeb --add-service=http
sudo firewall-cmd --permanent --zone=nakedeb --add-service=https
### xubu zone config
sudo firewall-cmd --permanent --new-zone=xubu
sudo firewall-cmd --permanent --zone=xubu --add-source=192.168.20.40/32
sudo firewall-cmd --permanent --zone=xubu --add-source=192.168.20.31/32
sudo firewall-cmd --permanent --zone=xubu --set-target=DROP
sudo firewall-cmd --permanent --zone=xubu --add-icmp-block=echo-request
sudo firewall-cmd --permanent --zone=xubu --add-icmp-block=echo-reply
sudo firewall-cmd --permanent --zone=xubu --add-icmp-block-inversion
sudo firewall-cmd --permanent --zone=xubu --add-service=ssh
sudo firewall-cmd --permanent --zone=xubu --add-service=dns
sudo firewall-cmd --permanent --zone=xubu --add-service=dhcp
sudo firewall-cmd --permanent --zone=xubu --add-service=http
sudo firewall-cmd --permanent --zone=xubu --add-service=https
### nat zone config
sudo firewall-cmd --permanent --new-zone=nat
sudo firewall-cmd --permanent --zone=nat --add-masquerade
sudo firewall-cmd --permanent --zone=nat --add-source=10.0.2.2
sudo firewall-cmd --permanent --zone=nat --add-source=10.0.2.15
sudo firewall-cmd --permanent --zone=nat --set-target=DROP
sudo firewall-cmd --permanent --zone=nat --set-target=DROP
sudo firewall-cmd --permanent --zone=nat --add-icmp-block=echo-request
sudo firewall-cmd --permanent --zone=nat --add-icmp-block=echo-reply
sudo firewall-cmd --permanent --zone=nat --add-icmp-block-inversion
sudo firewall-cmd --permanent --zone=nat --add-service=ssh
sudo firewall-cmd --permanent --zone=nat --add-service=http
sudo firewall-cmd --permanent --zone=nat --add-service=https
### firewalld reboot and runtime permanent
sudo firewall-cmd --reload
sudo firewall-cmd --runtime-to-permanent
----------------------------------------------------------------
Voici par exemple les paquets rejetés par mon parefeu sur xubu :
----------------------------------------------------------------
avril 11 20:59:43 cento1 kernel: "filter_FWDI_xubu_DROP: "IN=enp0s9 OUT=enp0s3 MAC=08:00:27:8a:65:3f:08:00:27:b0:12:a3:08:00 SRC=192.168.20.40 DST=142.250.74.238 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=36105 DF PROTO=TCP SPT=43520 DPT=443 W>
avril 11 20:59:44 cento1 kernel: "filter_FWDI_xubu_DROP: "IN=enp0s9 OUT=enp0s3 MAC=08:00:27:8a:65:3f:08:00:27:b0:12:a3:08:00 SRC=192.168.20.40 DST=142.250.74.238 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=45802 DF PROTO=TCP SPT=43522 DPT=443 W>
avril 11 20:59:44 cento1 kernel: "filter_FWDI_xubu_DROP: "IN=enp0s9 OUT=enp0s3 MAC=08:00:27:8a:65:3f:08:00:27:b0:12:a3:08:00 SRC=192.168.20.40 DST=142.250.74.238 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=60210 DF PROTO=TCP SPT=43524 DPT=443 W>
avril 11 20:59:44 cento1 kernel: "filter_FWDI_xubu_DROP: "IN=enp0s9 OUT=enp0s3 MAC=08:00:27:8a:65:3f:08:00:27:b0:12:a3:08:00 SRC=192.168.20.40 DST=142.250.74.238 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=26114 DF PROTO=TCP SPT=43526 DPT=443 W>
avril 11 20:59:44 cento1 kernel: "filter_FWDI_xubu_DROP: "IN=enp0s9 OUT=enp0s3 MAC=08:00:27:8a:65:3f:08:00:27:b0:12:a3:08:00 SRC=192.168.20.40 DST=142.250.74.238 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=48559 DF PROTO=TCP SPT=43518 DPT=443 W>
avril 11 20:59:44 cento1 kernel: "filter_FWDI_xubu_DROP: "IN=enp0s9 OUT=enp0s3 MAC=08:00:27:8a:65:3f:08:00:27:b0:12:a3:08:00 SRC=192.168.20.40 DST=142.250.74.238 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=14493 DF PROTO=TCP SPT=43528 DPT=443 W>
avril 11 20:59:44 cento1 kernel: "filter_FWDI_xubu_DROP: "IN=enp0s9 OUT=enp0s3 MAC=08:00:27:8a:65:3f:08:00:27:b0:12:a3:08:00 SRC=192.168.20.40 DST=142.250.74.238 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=36106 DF PROTO=TCP SPT=43520 DPT=443 W>
avril 11 20:59:45 cento1 kernel: "filter_FWDI_xubu_DROP: "IN=enp0s9 OUT=enp0s3 MAC=08:00:27:8a:65:3f:08:00:27:b0:12:a3:08:00 SRC=192.168.20.40 DST=142.250.74.238 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=26115 DF PROTO=TCP SPT=43526 DPT=443 W>
avril 11 20:59:45 cento1 kernel: "filter_FWDI_xubu_DROP: "IN=enp0s9 OUT=enp0s3 MAC=08:00:27:8a:65:3f:08:00:27:b0:12:a3:08:00 SRC=192.168.20.40 DST=142.250.74.238 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=60211 DF PROTO=TCP SPT=43524 DPT=443 W>
avril 11 20:59:45 cento1 kernel: "filter_FWDI_xubu_DROP: "IN=enp0s9 OUT=enp0s3 MAC=08:00:27:8a:65:3f:08:00:27:b0:12:a3:08:00 SRC=192.168.20.40 DST=142.250.74.238 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=45803 DF PROTO=TCP SPT=43522 DPT=443 W>
avril 11 20:59:45 cento1 kernel: "filter_FWDI_xubu_DROP: "IN=enp0s9 OUT=enp0s3 MAC=08:00:27:8a:65:3f:08:00:27:b0:12:a3:08:00 SRC=192.168.20.40 DST=142.250.74.238 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=14494 DF PROTO=TCP SPT=43528 DPT=443 W>
avril 11 20:59:46 cento1 kernel: "filter_FWDI_xubu_DROP: "IN=enp0s9 OUT=enp0s3 MAC=08:00:27:8a:65:3f:08:00:27:b0:12:a3:08:00 SRC=192.168.20.40 DST=142.250.74.238 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=48560 DF PROTO=TCP SPT=43518 DPT=443 W>
avril 11 20:59:46 cento1 kernel: "filter_FWDI_xubu_DROP: "IN=enp0s9 OUT=enp0s3 MAC=08:00:27:8a:65:3f:08:00:27:b0:12:a3:08:00 SRC=192.168.20.40 DST=142.250.74.238 LEN=60 TOS=0x00 PREC=0x00 TTL=63 ID=36107 DF PROTO=TCP SPT=43520 DPT=443 W>
Partager