IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Sécurité Discussion :

Firewalld Centos Troubbleshoot


Sujet :

Sécurité

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Administrateur systèmes et réseaux
    Inscrit en
    Avril 2022
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 25
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Administrateur systèmes et réseaux
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Avril 2022
    Messages : 2
    Points : 1
    Points
    1
    Par défaut Firewalld Centos Troubbleshoot
    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>

  2. #2
    Rédacteur/Modérateur
    Avatar de Winnt
    Homme Profil pro
    budget et contrôle de gestion
    Inscrit en
    Décembre 2006
    Messages
    1 978
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 56
    Localisation : France

    Informations professionnelles :
    Activité : budget et contrôle de gestion
    Secteur : Administration - Collectivité locale

    Informations forums :
    Inscription : Décembre 2006
    Messages : 1 978
    Points : 4 130
    Points
    4 130
    Par défaut
    Bonjour,

    Avez-vous regarder dans les paramètres de Firefox ?
    Il y a une rubrique "paramètres réseaux".
    Winnt
    Merci de lire les règles du forum LaTeX et Qu'est ce qu'un ECM ?.
    N'hésitez pas à parcourir la FAQ la réponse y est peut-être déjà.
    Pensez au bouton si votre problème est résolu.


    C'est en Linuxant qu'on devient .... geek
    Et c'est en LateXant qu'on devient flemmard
    Mon blog tout neuf.
    Articles : présentation de la distribution Gentoo, Les index sous LaTeX et leur personnalisation.

  3. #3
    Nouveau Candidat au Club
    Homme Profil pro
    Administrateur systèmes et réseaux
    Inscrit en
    Avril 2022
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 25
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Administrateur systèmes et réseaux
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Avril 2022
    Messages : 2
    Points : 1
    Points
    1
    Par défaut
    Le problème ne vient pas de firefox à mon avis je regarderais tout de même
    Un simple apt update échoue tout autant qu'un navigateur web pour afficher une page web

Discussions similaires

  1. CentOS 7 : Iptables Vs Firewalld
    Par bbkenny dans le forum Sécurité
    Réponses: 1
    Dernier message: 03/05/2018, 04h49
  2. [CentOS 7] Firewalld
    Par pitchu dans le forum RedHat / CentOS / Fedora
    Réponses: 0
    Dernier message: 25/01/2018, 10h35
  3. Fedora vs CentOS vs autres : la + légère/rapide pour serveur LAMP
    Par cyberderf dans le forum Serveurs (Apache, IIS,...)
    Réponses: 4
    Dernier message: 14/08/2006, 21h59
  4. Apache2 sur CentOS: Problème d'acces utilisateur
    Par Faith's Fall dans le forum Apache
    Réponses: 11
    Dernier message: 03/06/2006, 23h13
  5. [EasyPHP] compilation d'extensions linux centOS
    Par xave dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 14
    Dernier message: 07/04/2006, 15h20

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo