Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1952 connectés 

  FORUM HardWare.fr
  Linux et OS Alternatifs
  réseaux et sécurité

  Connexion serveur raspberry derrière freebox

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Connexion serveur raspberry derrière freebox

n°1497883
Oglien
Posté le 07-03-2025 à 10:37:48  profilanswer
 

Bonjour,
 
J'ai besoin de votre aide, mais vous vous en doutez puisque je suis là !  :wahoo:  
J'ai un raspberry pi avec un serveur apache dessus, connecté chez moi derrière ma freebox pop.
En local je me connecte très bien à mon serveur apache, j'affiche la page web depuis mon pc ou mon smartphone. Cependant lorsque j'utilise l'adresse ip publique depuis la 4G cela ne fonctionne plus...
J'ai pourtant bien un adresse ipv4 fullstack, j'ai fait les redirections de ports sur ma freebox, j'ai même mis la DMZ direction mon raspberry pour tester ! Rien ne change !
J'ai essayé aussi en prenant un nom de domaine, et ça ne change strictement rien (je ne l'ai peut être pas bien configuré)
 
J'ai testé sur des sites pour voir si mon/mes ports sont bien ouverts, mais il m'indique que non...
 
Je pense que mon souci vient de mon raspberry car j'ai essayé de mettre un petit serveur wamp sur mon pc, j'ai ouvert les ports, et j'arrive à y accéder depuis l'extérieur !
 
J'ai donc cherché s'il y avait un pare-feu d'activé sur le raspi, ufw n'est pas installé et nftables est désactivé. Je rate peut-être un truc tout bête... :pt1cable:  Des idées ??  
 
Merci d'avance !

mood
Publicité
Posté le 07-03-2025 à 10:37:48  profilanswer
 

n°1497912
Anonymous ​Coward
Posté le 08-03-2025 à 20:36:14  profilanswer
 

Bonjour,
 
Que te t'indiques les 3 dernières lignes de la commande hostnamectl sur la Raspberry Pi ?
 
Sinon, tu acceptes de nous donner l'adresse IP publique ainsi que les numéros de port ? Je ne pense pas que ce soit un gros risque en terme de sécurité mais tu est peut-être d'un autre avis.
 
Pour nftables, la commande ci-dessous ne renvoie absolument rien ?

sudo nft -nn list ruleset

n°1497929
Oglien
Posté le 09-03-2025 à 16:40:59  profilanswer
 

Anonymous Coward a écrit :

Bonjour,
 
Que te t'indiques les 3 dernières lignes de la commande hostnamectl sur la Raspberry Pi ?


 
Operating System: Debian GNU/Linux 12 (bookworm)
          Kernel: Linux 6.6.74+rpt-rpi-2712
    Architecture: arm64
 
 

Anonymous Coward a écrit :

Sinon, tu acceptes de nous donner l'adresse IP publique ainsi que les numéros de port ? Je ne pense pas que ce soit un gros risque en terme de sécurité mais tu est peut-être d'un autre avis.


 
En effet, je n'ai pas vraiment envie de la donner.  
 

Anonymous Coward a écrit :

Pour nftables, la commande ci-dessous ne renvoie absolument rien ?

sudo nft -nn list ruleset



 
Euh... en fait si, j'ai plein de choses, sans doute créées par les différents Docker que j'ai installés... J'imagine que la réponse à ma question est là-dedans... Des idées pour m'aider à comprendre tout ça ?
 

Code :
  1. # Warning: table ip filter is managed by iptables-nft, do not touch!
  2. table ip filter {
  3.         chain DOCKER {
  4.                 iifname != "br-8c4a20d2ad06" oifname "br-8c4a20d2ad06" ip daddr 172.18.0.2 tcp dport 8080 counter packets 0 bytes 0 accept
  5.                 iifname != "br-8c4a20d2ad06" oifname "br-8c4a20d2ad06" ip daddr 172.18.0.2 udp dport 6881 counter packets 0 bytes 0 accept
  6.                 iifname != "br-8c4a20d2ad06" oifname "br-8c4a20d2ad06" ip daddr 172.18.0.2 tcp dport 6881 counter packets 0 bytes 0 accept
  7.                 iifname != "br-177cb5287656" oifname "br-177cb5287656" ip daddr 172.23.0.2 tcp dport 9696 counter packets 0 bytes 0 accept
  8.                 iifname != "br-9b5e9864afa2" oifname "br-9b5e9864afa2" ip daddr 172.21.0.2 tcp dport 7878 counter packets 25 bytes 1428 accept
  9.                 iifname != "br-5c0f346baeed" oifname "br-5c0f346baeed" ip daddr 172.22.0.2 tcp dport 8191 counter packets 0 bytes 0 accept
  10.                 iifname != "br-7f8042d65a1b" oifname "br-7f8042d65a1b" ip daddr 172.20.0.2 tcp dport 9117 counter packets 0 bytes 0 accept
  11.                 iifname != "br-d893f3651dea" oifname "br-d893f3651dea" ip daddr 172.19.0.2 tcp dport 8081 counter packets 0 bytes 0 accept
  12.                 iifname != "br-d893f3651dea" oifname "br-d893f3651dea" counter packets 0 bytes 0 drop
  13.                 iifname != "br-177cb5287656" oifname "br-177cb5287656" counter packets 0 bytes 0 drop
  14.                 iifname != "br-5c0f346baeed" oifname "br-5c0f346baeed" counter packets 0 bytes 0 drop
  15.                 iifname != "br-7f8042d65a1b" oifname "br-7f8042d65a1b" counter packets 0 bytes 0 drop
  16.                 iifname != "br-8c4a20d2ad06" oifname "br-8c4a20d2ad06" counter packets 0 bytes 0 drop
  17.                 iifname != "br-9b5e9864afa2" oifname "br-9b5e9864afa2" counter packets 0 bytes 0 drop
  18.                 iifname != "docker0" oifname "docker0" counter packets 0 bytes 0 drop
  19.         }
  20.         chain DOCKER-ISOLATION-STAGE-1 {
  21.                 iifname "br-d893f3651dea" oifname != "br-d893f3651dea" counter packets 150 bytes 9000 jump DOCKER-ISOLATION-STAGE-2
  22.                 iifname "br-177cb5287656" oifname != "br-177cb5287656" counter packets 165 bytes 9900 jump DOCKER-ISOLATION-STAGE-2
  23.                 iifname "br-5c0f346baeed" oifname != "br-5c0f346baeed" counter packets 24 bytes 12402 jump DOCKER-ISOLATION-STAGE-2
  24.                 iifname "br-7f8042d65a1b" oifname != "br-7f8042d65a1b" counter packets 22 bytes 1320 jump DOCKER-ISOLATION-STAGE-2
  25.                 iifname "br-8c4a20d2ad06" oifname != "br-8c4a20d2ad06" counter packets 5483 bytes 329916 jump DOCKER-ISOLATION-STAGE-2
  26.                 iifname "br-9b5e9864afa2" oifname != "br-9b5e9864afa2" counter packets 549 bytes 228953 jump DOCKER-ISOLATION-STAGE-2
  27.                 iifname "docker0" oifname != "docker0" counter packets 0 bytes 0 jump DOCKER-ISOLATION-STAGE-2
  28.         }
  29.         chain FORWARD {
  30.                 type filter hook forward priority 0; policy drop;
  31.                 counter packets 6858 bytes 732590 jump DOCKER-USER
  32.                 counter packets 6858 bytes 732590 jump ts-forward
  33.                 counter packets 6858 bytes 732590 jump DOCKER-FORWARD
  34.         }
  35.         chain DOCKER-USER {
  36.                 counter packets 162321 bytes 98549487 return
  37.         }
  38.         chain INPUT {
  39.                 type filter hook input priority 0; policy accept;
  40.                 counter packets 12353 bytes 2829756 jump ts-input
  41.         }
  42.         chain DOCKER-FORWARD {
  43.                 counter packets 6858 bytes 732590 jump DOCKER-CT
  44.                 counter packets 6418 bytes 592919 jump DOCKER-ISOLATION-STAGE-1
  45.                 counter packets 6418 bytes 592919 jump DOCKER-BRIDGE
  46.                 iifname "br-d893f3651dea" counter packets 150 bytes 9000 accept
  47.                 iifname "br-177cb5287656" counter packets 165 bytes 9900 accept
  48.                 iifname "br-5c0f346baeed" counter packets 24 bytes 12402 accept
  49.                 iifname "br-7f8042d65a1b" counter packets 22 bytes 1320 accept
  50.                 iifname "br-8c4a20d2ad06" counter packets 5483 bytes 329916 accept
  51.                 iifname "br-9b5e9864afa2" counter packets 549 bytes 228953 accept
  52.                 iifname "docker0" counter packets 0 bytes 0 accept
  53.         }
  54.         chain DOCKER-BRIDGE {
  55.                 oifname "br-d893f3651dea" counter packets 0 bytes 0 jump DOCKER
  56.                 oifname "br-177cb5287656" counter packets 0 bytes 0 jump DOCKER
  57.                 oifname "br-5c0f346baeed" counter packets 0 bytes 0 jump DOCKER
  58.                 oifname "br-7f8042d65a1b" counter packets 0 bytes 0 jump DOCKER
  59.                 oifname "br-8c4a20d2ad06" counter packets 0 bytes 0 jump DOCKER
  60.                 oifname "br-9b5e9864afa2" counter packets 25 bytes 1428 jump DOCKER
  61.                 oifname "docker0" counter packets 0 bytes 0 jump DOCKER
  62.         }
  63.         chain DOCKER-CT {
  64.                 oifname "br-d893f3651dea" ct state related,established counter packets 0 bytes 0 accept
  65.                 oifname "br-177cb5287656" ct state related,established counter packets 0 bytes 0 accept
  66.                 oifname "br-5c0f346baeed" ct state related,established counter packets 0 bytes 0 accept
  67.                 oifname "br-7f8042d65a1b" ct state related,established counter packets 0 bytes 0 accept
  68.                 oifname "br-8c4a20d2ad06" ct state related,established counter packets 0 bytes 0 accept
  69.                 oifname "br-9b5e9864afa2" ct state related,established counter packets 440 bytes 139671 accept
  70.                 oifname "docker0" ct state related,established counter packets 0 bytes 0 accept
  71.         }
  72.         chain DOCKER-ISOLATION-STAGE-2 {
  73.                 oifname "docker0" counter packets 0 bytes 0 drop
  74.                 oifname "br-9b5e9864afa2" counter packets 0 bytes 0 drop
  75.                 oifname "br-8c4a20d2ad06" counter packets 0 bytes 0 drop
  76.                 oifname "br-7f8042d65a1b" counter packets 0 bytes 0 drop
  77.                 oifname "br-5c0f346baeed" counter packets 0 bytes 0 drop
  78.                 oifname "br-177cb5287656" counter packets 0 bytes 0 drop
  79.                 oifname "br-d893f3651dea" counter packets 0 bytes 0 drop
  80.         }
  81.         chain ts-input {
  82.                 iifname "lo" ip saddr 100.85.252.89 counter packets 0 bytes 0 accept
  83.                 iifname != "tailscale0" ip saddr 100.115.92.0/23 counter packets 0 bytes 0 return
  84.                 iifname != "tailscale0" ip saddr 100.64.0.0/10 counter packets 0 bytes 0 drop
  85.                 iifname "tailscale0" counter packets 132 bytes 14569 accept
  86.                 udp dport 41641 counter packets 0 bytes 0 accept
  87.         }
  88.         chain ts-forward {
  89.                 iifname "tailscale0" counter packets 0 bytes 0 meta mark set mark and 0xff00ffff xor 0x40000
  90.                 meta mark & 0x00ff0000 == 0x00040000 counter packets 0 bytes 0 accept
  91.                 oifname "tailscale0" ip saddr 100.64.0.0/10 counter packets 0 bytes 0 drop
  92.                 oifname "tailscale0" counter packets 0 bytes 0 accept
  93.         }
  94. }
  95. # Warning: table ip nat is managed by iptables-nft, do not touch!
  96. table ip nat {
  97.         chain PREROUTING {
  98.                 type nat hook prerouting priority -100; policy accept;
  99.                 fib daddr type local counter packets 676 bytes 299740 jump DOCKER
  100.         }
  101.         chain OUTPUT {
  102.                 type nat hook output priority -100; policy accept;
  103.                 ip daddr != 127.0.0.0/8 fib daddr type local counter packets 150 bytes 4500 jump DOCKER
  104.         }
  105.         chain POSTROUTING {
  106.                 type nat hook postrouting priority 100; policy accept;
  107.                 oifname != "docker0" ip saddr 172.17.0.0/16 counter packets 0 bytes 0 masquerade
  108.                 counter packets 2229 bytes 163911 jump ts-postrouting
  109.                 oifname != "br-5c0f346baeed" ip saddr 172.22.0.0/16 counter packets 4855 bytes 152550 masquerade
  110.                 oifname != "br-177cb5287656" ip saddr 172.23.0.0/16 counter packets 4902 bytes 150498 masquerade
  111.                 oifname != "br-d893f3651dea" ip saddr 172.19.0.0/16 counter packets 5403 bytes 180558 masquerade
  112.                 oifname != "br-9b5e9864afa2" ip saddr 172.21.0.0/16 counter packets 4883 bytes 149358 masquerade
  113.                 oifname != "br-8c4a20d2ad06" ip saddr 172.18.0.0/16 counter packets 12957 bytes 863780 masquerade
  114.                 oifname != "br-7f8042d65a1b" ip saddr 172.20.0.0/16 counter packets 4844 bytes 147018 masquerade
  115.         }
  116.         chain DOCKER {
  117.                 iifname "docker0" counter packets 0 bytes 0 return
  118.                 iifname "br-9b5e9864afa2" counter packets 2 bytes 120 return
  119.                 iifname "br-8c4a20d2ad06" counter packets 1 bytes 88 return
  120.                 iifname "br-7f8042d65a1b" counter packets 0 bytes 0 return
  121.                 iifname "br-5c0f346baeed" counter packets 0 bytes 0 return
  122.                 iifname "br-177cb5287656" counter packets 0 bytes 0 return
  123.                 iifname "br-d893f3651dea" counter packets 0 bytes 0 return
  124.                 iifname != "br-d893f3651dea" tcp dport 8081 counter packets 0 bytes 0 dnat to 172.19.0.2:8081
  125.                 iifname != "br-7f8042d65a1b" tcp dport 9117 counter packets 0 bytes 0 dnat to 172.20.0.2:9117
  126.                 iifname != "br-5c0f346baeed" tcp dport 8191 counter packets 0 bytes 0 dnat to 172.22.0.2:8191
  127.                 iifname != "br-9b5e9864afa2" tcp dport 7878 counter packets 25 bytes 1428 dnat to 172.21.0.2:7878
  128.                 iifname != "br-177cb5287656" tcp dport 9696 counter packets 0 bytes 0 dnat to 172.23.0.2:9696
  129.                 iifname != "br-8c4a20d2ad06" tcp dport 6881 counter packets 0 bytes 0 dnat to 172.18.0.2:6881
  130.                 iifname != "br-8c4a20d2ad06" udp dport 6881 counter packets 0 bytes 0 dnat to 172.18.0.2:6881
  131.                 iifname != "br-8c4a20d2ad06" tcp dport 8080 counter packets 0 bytes 0 dnat to 172.18.0.2:8080
  132.         }
  133.         chain ts-postrouting {
  134.                 meta mark & 0x00ff0000 == 0x00040000 counter packets 0 bytes 0 masquerade
  135.         }
  136. }
  137. # Warning: table ip6 filter is managed by iptables-nft, do not touch!
  138. table ip6 filter {
  139.         chain DOCKER {
  140.         }
  141.         chain DOCKER-ISOLATION-STAGE-1 {
  142.         }
  143.         chain FORWARD {
  144.                 type filter hook forward priority 0; policy accept;
  145.                 counter packets 0 bytes 0 jump DOCKER-USER
  146.                 counter packets 0 bytes 0 jump ts-forward
  147.                 counter packets 0 bytes 0 jump DOCKER-FORWARD
  148.         }
  149.         chain DOCKER-USER {
  150.                 counter packets 0 bytes 0 return
  151.         }
  152.         chain INPUT {
  153.                 type filter hook input priority 0; policy accept;
  154.                 counter packets 2229 bytes 653042 jump ts-input
  155.         }
  156.         chain DOCKER-FORWARD {
  157.                 counter packets 0 bytes 0 jump DOCKER-CT
  158.                 counter packets 0 bytes 0 jump DOCKER-ISOLATION-STAGE-1
  159.                 counter packets 0 bytes 0 jump DOCKER-BRIDGE
  160.         }
  161.         chain DOCKER-BRIDGE {
  162.         }
  163.         chain DOCKER-CT {
  164.         }
  165.         chain DOCKER-ISOLATION-STAGE-2 {
  166.         }
  167.         chain ts-input {
  168.                 iifname "lo" ip6 saddr fd7a:115c:a1e0::8801:fc5a counter packets 0 bytes 0 accept
  169.                 iifname "tailscale0" counter packets 0 bytes 0 accept
  170.                 udp dport 41641 counter packets 146 bytes 13432 accept
  171.         }
  172.         chain ts-forward {
  173.                 iifname "tailscale0" counter packets 0 bytes 0 meta mark set mark and 0xff00ffff xor 0x40000
  174.                 meta mark & 0x00ff0000 == 0x00040000 counter packets 0 bytes 0 accept
  175.                 oifname "tailscale0" counter packets 0 bytes 0 accept
  176.         }
  177. }
  178. # Warning: table ip6 nat is managed by iptables-nft, do not touch!
  179. table ip6 nat {
  180.         chain PREROUTING {
  181.                 type nat hook prerouting priority -100; policy accept;
  182.                 fib daddr type local counter packets 19 bytes 1748 jump DOCKER
  183.         }
  184.         chain OUTPUT {
  185.                 type nat hook output priority -100; policy accept;
  186.                 ip6 daddr != ::1 fib daddr type local counter packets 0 bytes 0 jump DOCKER
  187.         }
  188.         chain POSTROUTING {
  189.                 type nat hook postrouting priority 100; policy accept;
  190.                 counter packets 397 bytes 35533 jump ts-postrouting
  191.         }
  192.         chain DOCKER {
  193.         }
  194.         chain ts-postrouting {
  195.                 meta mark & 0x00ff0000 == 0x00040000 counter packets 0 bytes 0 XT target MASQUERADE not found
  196.         }
  197. }
  198. table ip raw {
  199.         chain PREROUTING {
  200.                 type filter hook prerouting priority -300; policy accept;
  201.                 iifname != "br-d893f3651dea" ip daddr 172.19.0.2 tcp dport 8081 counter packets 0 bytes 0 drop
  202.                 iifname != "br-7f8042d65a1b" ip daddr 172.20.0.2 tcp dport 9117 counter packets 0 bytes 0 drop
  203.                 iifname != "br-5c0f346baeed" ip daddr 172.22.0.2 tcp dport 8191 counter packets 0 bytes 0 drop
  204.                 iifname != "br-9b5e9864afa2" ip daddr 172.21.0.2 tcp dport 7878 counter packets 0 bytes 0 drop
  205.                 iifname != "br-177cb5287656" ip daddr 172.23.0.2 tcp dport 9696 counter packets 0 bytes 0 drop
  206.                 iifname != "br-8c4a20d2ad06" ip daddr 172.18.0.2 tcp dport 6881 counter packets 0 bytes 0 drop
  207.                 iifname != "br-8c4a20d2ad06" ip daddr 172.18.0.2 udp dport 6881 counter packets 0 bytes 0 drop
  208.                 iifname != "br-8c4a20d2ad06" ip daddr 172.18.0.2 tcp dport 8080 counter packets 0 bytes 0 drop
  209.         }
  210. }


Message édité par Oglien le 09-03-2025 à 17:54:42

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Linux et OS Alternatifs
  réseaux et sécurité

  Connexion serveur raspberry derrière freebox

 

Sujets relatifs
Lecteur mpv enjolivé, serveur FTP et site Web locaux, thème Materia àinstaller plusieurs sites wordpress sur Raspberry PI4B
Choix d'un serveur de fichiers sur OMV (Nextcloud ect)Connecter un serveur Ubuntu à un réseau wifi
Mettre en veille un serveur pendant la nuitOMV accès internet wifi et partage connexion
serveur dhcp sur 2eme ethernet ne fonctionne pasProblème serveur VNC (x11vnc, tightvnc) pour Ubuntu 20.04
Serveur Proxmox imitant Free-EOS et hardware du serveur et du réseauServeur Kimsufi et services
Plus de sujets relatifs à : Connexion serveur raspberry derrière freebox


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)