[VPN] Site auto hébergé indisponible avec un VPN (résolu)
[VPN] Site auto hébergé indisponible avec un VPN (résolu)
Bonjour à tous.
J’ai un site auto hébergé qui n’est plus accessible depuis que j’ai installé un VPN.
J’utilise comme serveur Nginx et mon VPN est Private Internet Access.
Si quelqu’un peut m’aider à résoudre mon problème ?
Merci.
Ignace.
J’ai un site auto hébergé qui n’est plus accessible depuis que j’ai installé un VPN.
J’utilise comme serveur Nginx et mon VPN est Private Internet Access.
Si quelqu’un peut m’aider à résoudre mon problème ?
Merci.
Ignace.
Dernière modification par ignace72 le mar. 09 mars 2021, 13:54, modifié 1 fois.
AMD Ryzen 3 1200 Quad-Core,32 Go de Ram DDR4, Wifi, USB3, S-ATA 3
21,5" LCD x2 sur AMD FirePro W5000 (pilote libre radeon).
KDE et BÉPO.
Site perso : https://ignace72.eu
21,5" LCD x2 sur AMD FirePro W5000 (pilote libre radeon).
KDE et BÉPO.
Site perso : https://ignace72.eu
Re: [VPN] Site auto hébergé indisponible avec un VPN
Bonjour,
Dans le fonctionnement les paquets reçus par le serveur web sont traités et une réponse est envoyée. Pour le retour la table de routage est consultée, le problème avec la table de routage actuelle les paquets sont routés par le vpn ce qui casse la connexion entre client et serveur.
Les paquets en retour doivent être routés via l'ip de la box, cela nécessite de mettre en place un marquage des paquets et un suivi de connexion pour effectuer correctement le routage retour.
Je peux donner une explication par contre pour la mise en place de la solution j'ai pas tout en tête à l'instant.
Dans le fonctionnement les paquets reçus par le serveur web sont traités et une réponse est envoyée. Pour le retour la table de routage est consultée, le problème avec la table de routage actuelle les paquets sont routés par le vpn ce qui casse la connexion entre client et serveur.
Les paquets en retour doivent être routés via l'ip de la box, cela nécessite de mettre en place un marquage des paquets et un suivi de connexion pour effectuer correctement le routage retour.
Je peux donner une explication par contre pour la mise en place de la solution j'ai pas tout en tête à l'instant.
Dernière modification par laurent85 le ven. 05 mars 2021, 17:27, modifié 1 fois.
Re: [VPN] Site auto hébergé indisponible avec un VPN
Bonjour, laurent85.
Je suis preneur d’explication, car c’est un peu confus pour moi. Pour mettre la solution en place, je ferai des recherches de mon côté.
Merci pour ta réponse.
Ignace.
Je suis preneur d’explication, car c’est un peu confus pour moi. Pour mettre la solution en place, je ferai des recherches de mon côté.
Merci pour ta réponse.
Ignace.
AMD Ryzen 3 1200 Quad-Core,32 Go de Ram DDR4, Wifi, USB3, S-ATA 3
21,5" LCD x2 sur AMD FirePro W5000 (pilote libre radeon).
KDE et BÉPO.
Site perso : https://ignace72.eu
21,5" LCD x2 sur AMD FirePro W5000 (pilote libre radeon).
KDE et BÉPO.
Site perso : https://ignace72.eu
- benjarobin
- Maître du Kyudo
- Messages : 17227
- Inscription : sam. 30 mai 2009, 15:48
- Localisation : Lyon
Re: [VPN] Site auto hébergé indisponible avec un VPN
Bonjour, je crois que tu veux cela : https://unix.stackexchange.com/question ... s-incoming
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Re: [VPN] Site auto hébergé indisponible avec un VPN
Bonsoir, benjarobin.
Je ne sais pas, je vais regarder ça de plus près demain. Je serai plus frais.
Ignace.
Je ne sais pas, je vais regarder ça de plus près demain. Je serai plus frais.
Ignace.
AMD Ryzen 3 1200 Quad-Core,32 Go de Ram DDR4, Wifi, USB3, S-ATA 3
21,5" LCD x2 sur AMD FirePro W5000 (pilote libre radeon).
KDE et BÉPO.
Site perso : https://ignace72.eu
21,5" LCD x2 sur AMD FirePro W5000 (pilote libre radeon).
KDE et BÉPO.
Site perso : https://ignace72.eu
Re: [VPN] Site auto hébergé indisponible avec un VPN
Bonsoir à tous.
Je n’y comprends rien.
Si quelqu’un peut m’y aider ?
Voilà le contenu de diverses commande avec le VPN en fonction :
Voilà le contenu de ifconfig :
Voilà le contenu de la commande sudo iptables -L :
Merci d’avance.
Ignace.
Je n’y comprends rien.
Si quelqu’un peut m’y aider ?
Voilà le contenu de diverses commande avec le VPN en fonction :
Voilà le contenu de ifconfig :
Code : Tout sélectionner
enp3s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:24:1d:7e:c6:56 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp4s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 00:24:1d:7e:c6:58 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 4978723 bytes 761771981 (726.4 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4978723 bytes 761771981 (726.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.18.12.2 netmask 255.255.255.0 destination 10.18.12.2
inet6 fe80::9d6c:8bfd:c294:475f prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 100 (UNSPEC)
RX packets 116217 bytes 161655102 (154.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 56975 bytes 3031625 (2.8 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp10s7: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b2:59:ab:c9:19:54 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp8s0u2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.3 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::7b56:a8c8:bb9a:d0e9 prefixlen 64 scopeid 0x20<link>
ether 1c:bf:ce:35:6c:fb txqueuelen 1000 (Ethernet)
RX packets 2707458 bytes 4635563729 (4.3 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1538011 bytes 325117012 (310.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Code : Tout sélectionner
[sudo] Mot de passe de ignace :
Chain INPUT (policy ACCEPT)
target prot opt source destination
piavpn.INPUT all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
piavpn.FORWARD all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
piavpn.anchors all -- anywhere anywhere
Chain piavpn.000.allowLoopback (1 references)
target prot opt source destination
piavpn.r.000.allowLoopback all -- anywhere anywhere
Chain piavpn.100.blockAll (1 references)
target prot opt source destination
piavpn.r.100.blockAll all -- anywhere anywhere
Chain piavpn.100.protectLoopback (1 references)
target prot opt source destination
piavpn.r.100.protectLoopback all -- anywhere anywhere
Chain piavpn.200.allowVPN (1 references)
target prot opt source destination
piavpn.r.200.allowVPN all -- anywhere anywhere
Chain piavpn.230.allowBypassApps (0 references)
target prot opt source destination
piavpn.r.230.allowBypassApps all -- anywhere anywhere
Chain piavpn.290.allowDHCP (1 references)
target prot opt source destination
piavpn.r.290.allowDHCP all -- anywhere anywhere
Chain piavpn.300.allowLAN (1 references)
target prot opt source destination
piavpn.r.300.allowLAN all -- anywhere anywhere
Chain piavpn.305.allowSubnets (0 references)
target prot opt source destination
piavpn.r.305.allowSubnets all -- anywhere anywhere
Chain piavpn.310.blockDNS (1 references)
target prot opt source destination
piavpn.r.310.blockDNS all -- anywhere anywhere
Chain piavpn.320.allowDNS (1 references)
target prot opt source destination
piavpn.r.320.allowDNS all -- anywhere anywhere
Chain piavpn.340.blockVpnOnly (0 references)
target prot opt source destination
piavpn.r.340.blockVpnOnly all -- anywhere anywhere
Chain piavpn.350.allowHnsd (0 references)
target prot opt source destination
piavpn.r.350.allowHnsd all -- anywhere anywhere
Chain piavpn.350.cgAllowHnsd (0 references)
target prot opt source destination
piavpn.r.350.cgAllowHnsd all -- anywhere anywhere
Chain piavpn.390.allowWg (1 references)
target prot opt source destination
piavpn.r.390.allowWg all -- anywhere anywhere
Chain piavpn.400.allowPIA (1 references)
target prot opt source destination
piavpn.r.400.allowPIA all -- anywhere anywhere
Chain piavpn.FORWARD (1 references)
target prot opt source destination
Chain piavpn.INPUT (1 references)
target prot opt source destination
piavpn.a.100.protectLoopback all -- anywhere anywhere
Chain piavpn.a.000.allowLoopback (1 references)
target prot opt source destination
piavpn.000.allowLoopback all -- anywhere anywhere
Chain piavpn.a.100.blockAll (1 references)
target prot opt source destination
piavpn.100.blockAll all -- anywhere anywhere
Chain piavpn.a.100.protectLoopback (1 references)
target prot opt source destination
piavpn.100.protectLoopback all -- anywhere anywhere
Chain piavpn.a.200.allowVPN (1 references)
target prot opt source destination
piavpn.200.allowVPN all -- anywhere anywhere
Chain piavpn.a.230.allowBypassApps (1 references)
target prot opt source destination
Chain piavpn.a.290.allowDHCP (1 references)
target prot opt source destination
piavpn.290.allowDHCP all -- anywhere anywhere
Chain piavpn.a.300.allowLAN (1 references)
target prot opt source destination
piavpn.300.allowLAN all -- anywhere anywhere
Chain piavpn.a.305.allowSubnets (1 references)
target prot opt source destination
Chain piavpn.a.310.blockDNS (1 references)
target prot opt source destination
piavpn.310.blockDNS all -- anywhere anywhere
Chain piavpn.a.320.allowDNS (1 references)
target prot opt source destination
piavpn.320.allowDNS all -- anywhere anywhere
Chain piavpn.a.340.blockVpnOnly (1 references)
target prot opt source destination
Chain piavpn.a.350.allowHnsd (1 references)
target prot opt source destination
Chain piavpn.a.350.cgAllowHnsd (1 references)
target prot opt source destination
Chain piavpn.a.390.allowWg (1 references)
target prot opt source destination
piavpn.390.allowWg all -- anywhere anywhere
Chain piavpn.a.400.allowPIA (1 references)
target prot opt source destination
piavpn.400.allowPIA all -- anywhere anywhere
Chain piavpn.anchors (1 references)
target prot opt source destination
piavpn.a.000.allowLoopback all -- anywhere anywhere
piavpn.a.400.allowPIA all -- anywhere anywhere
piavpn.a.390.allowWg all -- anywhere anywhere
piavpn.a.350.allowHnsd all -- anywhere anywhere
piavpn.a.350.cgAllowHnsd all -- anywhere anywhere
piavpn.a.340.blockVpnOnly all -- anywhere anywhere
piavpn.a.320.allowDNS all -- anywhere anywhere
piavpn.a.310.blockDNS all -- anywhere anywhere
piavpn.a.305.allowSubnets all -- anywhere anywhere
piavpn.a.300.allowLAN all -- anywhere anywhere
piavpn.a.290.allowDHCP all -- anywhere anywhere
piavpn.a.230.allowBypassApps all -- anywhere anywhere
piavpn.a.200.allowVPN all -- anywhere anywhere
piavpn.a.100.blockAll all -- anywhere anywhere
Chain piavpn.r.000.allowLoopback (1 references)
target prot opt source destination
RETURN udp -- anywhere anywhere udp dpt:domain
RETURN tcp -- anywhere anywhere tcp dpt:domain
ACCEPT all -- anywhere anywhere
Chain piavpn.r.100.blockAll (1 references)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain piavpn.r.100.protectLoopback (1 references)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain piavpn.r.200.allowVPN (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain piavpn.r.230.allowBypassApps (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere cgroup 1383
Chain piavpn.r.290.allowDHCP (1 references)
target prot opt source destination
ACCEPT udp -- anywhere 255.255.255.255 udp spt:bootpc dpt:bootps
Chain piavpn.r.300.allowLAN (1 references)
target prot opt source destination
ACCEPT all -- anywhere 10.0.0.0/8
ACCEPT all -- anywhere 169.254.0.0/16
ACCEPT all -- anywhere 172.16.0.0/12
ACCEPT all -- anywhere 192.168.0.0/16
ACCEPT all -- anywhere base-address.mcast.net/4
ACCEPT all -- anywhere 255.255.255.255
Chain piavpn.r.305.allowSubnets (1 references)
target prot opt source destination
Chain piavpn.r.310.blockDNS (1 references)
target prot opt source destination
REJECT udp -- anywhere anywhere udp dpt:domain reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:domain reject-with icmp-port-unreachable
Chain piavpn.r.320.allowDNS (1 references)
target prot opt source destination
ACCEPT udp -- anywhere a6e525e6998e udp dpt:domain
ACCEPT tcp -- anywhere a6e525e6998e tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
Chain piavpn.r.340.blockVpnOnly (1 references)
target prot opt source destination
REJECT all -- anywhere anywhere cgroup 1384 reject-with icmp-port-unreachable
Chain piavpn.r.350.allowHnsd (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere owner GID match piahnsd multiport dports domain,13038
ACCEPT udp -- anywhere anywhere owner GID match piahnsd multiport dports domain,13038
REJECT all -- anywhere anywhere owner GID match piahnsd reject-with icmp-port-unreachable
Chain piavpn.r.350.cgAllowHnsd (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere owner GID match piahnsd cgroup 1384 multiport dports domain,13038
ACCEPT udp -- anywhere anywhere owner GID match piahnsd cgroup 1384 multiport dports domain,13038
REJECT all -- anywhere anywhere owner GID match piahnsd reject-with icmp-port-unreachable
Chain piavpn.r.390.allowWg (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere mark match 0x3213
Chain piavpn.r.400.allowPIA (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere owner GID match piavpn
Ignace.
AMD Ryzen 3 1200 Quad-Core,32 Go de Ram DDR4, Wifi, USB3, S-ATA 3
21,5" LCD x2 sur AMD FirePro W5000 (pilote libre radeon).
KDE et BÉPO.
Site perso : https://ignace72.eu
21,5" LCD x2 sur AMD FirePro W5000 (pilote libre radeon).
KDE et BÉPO.
Site perso : https://ignace72.eu
Re: [VPN] Site auto hébergé indisponible avec un VPN
Le logiciel du vpn a mis en place un pare-feu, cela explique les échecs de la commande dig avec la route spécifique, la requête était bloquée.
Je ne connais pas ce service vpn ni ses options de paramétrage. Il a pris le contrôle du réseau, c'est un service qui est probablement satisfaisant pour un pc de bureau et surfer sur internet, par contre il n'est pas adapté pour un serveur. Ceci dit il est en théorie possible de "corriger" ces règles iptables du vpn avec de la ligne de commande ou un script après coup mais ça ne sera pas une solution propre et ça prend du temps à déboguer.
La solution la plus simple à mon avis dans ton cas est de ne pas héberger tes services sur la même machine que celle du client vpn. Ou d'utiliser un service vpn qui ne met pas automatiquement en place un pare-feu en plus du vpn.
Je ne connais pas ce service vpn ni ses options de paramétrage. Il a pris le contrôle du réseau, c'est un service qui est probablement satisfaisant pour un pc de bureau et surfer sur internet, par contre il n'est pas adapté pour un serveur. Ceci dit il est en théorie possible de "corriger" ces règles iptables du vpn avec de la ligne de commande ou un script après coup mais ça ne sera pas une solution propre et ça prend du temps à déboguer.
La solution la plus simple à mon avis dans ton cas est de ne pas héberger tes services sur la même machine que celle du client vpn. Ou d'utiliser un service vpn qui ne met pas automatiquement en place un pare-feu en plus du vpn.
Re: [VPN] Site auto hébergé indisponible avec un VPN
Bonsoir, laurent85.
C’est la solution vers la quelle je me dirige.
J’ai pris un hébergement chez Gandi du fait que j’ai mon nom de domaine est chez eux.
Ignace.
C’est la solution vers la quelle je me dirige.
J’ai pris un hébergement chez Gandi du fait que j’ai mon nom de domaine est chez eux.
Ignace.
AMD Ryzen 3 1200 Quad-Core,32 Go de Ram DDR4, Wifi, USB3, S-ATA 3
21,5" LCD x2 sur AMD FirePro W5000 (pilote libre radeon).
KDE et BÉPO.
Site perso : https://ignace72.eu
21,5" LCD x2 sur AMD FirePro W5000 (pilote libre radeon).
KDE et BÉPO.
Site perso : https://ignace72.eu