Toujours même problème avec le vpn

Mon serveur YunoHost

Matériel: Brique Internet avec VPN
Version de YunoHost:

L’architecture du serveur est bare-metal armhf
Le modèle du serveur est Olimex A20-OLinuXino-LIME
Le serveur utilise le noyau Linux 4.19.62-sunxi
Le serveur utilise Debian 10.9
Le serveur utilise YunoHost 4.2.1.1 (testing)
yunohost version : 4.2.1.1 (testing)
yunohost-admin version : 4.2.0 (testing)
moulinette version : 4.2.0 (testing)
ssowat version : 4.2.0 (testing)

J’ai accès à mon serveur : En SSH | Par la webadmin

Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : oui
Si oui, expliquer:
Testing

Description du problème

Bonsoir @tous,

Toujours le même soucis pas d’accès à beaucoup de sites par le vpn alors qu’avec la box aucun problème accès à tout.
Lien vers le précédent sujet:

Si quelqu’un à une idée je suis preneur car je trouve aucune solution pour essayer de corriger mon problème.

Bonne soirée @tous et bon week-end.

didier58

ping @ljf si t’as une idée…

Ben ça ressemble furieusement à un soucis de hotspot en ipv4. Mais pour le diagnostiquer c’est galère car je connais plus trop bien hotspot…

Que donne les commandes suivantes :

iptables-save
systemctl status dnsmasq
ip a

Salut @ljf,

voila le retour des trois commandes:

iptables-save

# iptables-save
# Generated by xtables-save v1.8.2 on Sat Apr 17 20:39:08 2021
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:vpnclient_in - [0:0]
:vpnclient_out - [0:0]
:vpnclient_fwd - [0:0]
:f2b-sshd - [0:0]
:f2b-postfix - [0:0]
-A INPUT -p tcp -m multiport --dports 25,587 -j f2b-postfix
-A INPUT -p tcp -m multiport --dports 22 -j f2b-sshd
-A INPUT -i eth0 -j vpnclient_in
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 25 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 53 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 587 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 993 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5222 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 5269 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 24800 -j ACCEPT
-A INPUT -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -p udp -m udp --dport 5353 -j ACCEPT
-A INPUT -p udp -m udp --dport 67 -j ACCEPT
-A INPUT -p udp -m udp --dport 24800 -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A FORWARD -o eth0 -j vpnclient_fwd
-A OUTPUT -o eth0 -j vpnclient_out
-A vpnclient_in -p icmp -j ACCEPT
-A vpnclient_in -s 10.0.0.0/8 -j ACCEPT
-A vpnclient_in -s 172.16.0.0/12 -j ACCEPT
-A vpnclient_in -s 192.168.0.0/16 -j ACCEPT
-A vpnclient_in -s 169.254.0.0/16 -j ACCEPT
-A vpnclient_in -p tcp -m tcp --dport 22 -j ACCEPT
-A vpnclient_in -p tcp -m tcp --dport 443 -j ACCEPT
-A vpnclient_in -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A vpnclient_in -j DROP
-A vpnclient_out -d 89.234.141.66/32 -p udp -m udp --dport 53 -j ACCEPT
-A vpnclient_out -d 10.0.0.0/8 -j ACCEPT
-A vpnclient_out -d 172.16.0.0/12 -j ACCEPT
-A vpnclient_out -d 192.168.0.0/16 -j ACCEPT
-A vpnclient_out -d 169.254.0.0/16 -j ACCEPT
-A vpnclient_out -d 224.0.0.251/32 -p udp -m udp --dport 5353 -j ACCEPT
-A vpnclient_out -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A vpnclient_out -j DROP
-A vpnclient_fwd -j DROP
-A f2b-sshd -j RETURN
-A f2b-postfix -j RETURN
COMMIT
# Completed on Sat Apr 17 20:39:09 2021
# Generated by xtables-save v1.8.2 on Sat Apr 17 20:39:09 2021
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:DOCKER - [0:0]
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
-A POSTROUTING -o eth0 -j MASQUERADE
-A POSTROUTING -o tun0 -j MASQUERADE
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
-A DOCKER -i docker0 -j RETURN
COMMIT
# Completed on Sat Apr 17 20:39:09 2021
# systemctl status dnsmasq
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: 
   Active: active (running) since Sun 2021-04-11 00:19:57 UTC; 6 days ago
 Main PID: 1074 (dnsmasq)
    Tasks: 1 (limit: 856)
   Memory: 1020.0K
   CGroup: /system.slice/dnsmasq.service
           └─1074 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /e

Apr 17 17:38:48 didiercl.me dnsmasq[1074]: reading /etc/resolv.dnsmasq.conf
Apr 17 17:38:48 didiercl.me dnsmasq[1074]: using nameserver 89.234.141.66#53
Apr 17 17:38:48 didiercl.me dnsmasq[1074]: reading /etc/resolv.dnsmasq.conf
Apr 17 17:38:48 didiercl.me dnsmasq[1074]: using nameserver 89.234.141.66#53
Apr 17 17:38:48 didiercl.me dnsmasq[1074]: using nameserver 2a00:5881:8100:1000:
Warning: Journal has been rotated since unit was started. Log output is incomple
lines 1-15/15 (END)
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 16:46:f7:fb:ed:15 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 02:41:05:c2:b0:81 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.23/24 brd 192.168.1.255 scope global dynamic eth0
       valid_lft 75200sec preferred_lft 75200sec
    inet6 fe80::42:acab/128 scope link 
       valid_lft forever preferred_lft forever
    inet6 fe80::41:5ff:fec2:b081/64 scope link 
       valid_lft forever preferred_lft forever
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 02:de:d0:16:3a:00 brd ff:ff:ff:ff:ff:ff
    inet 10.0.242.1/24 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 2a00:5881:8118:400::42/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::de:d0ff:fe16:3a00/64 scope link 
       valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:c3:83:d1:d1 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
9: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
    link/none 
    inet 89.234.141.4/26 brd 89.234.141.63 scope global tun0
       valid_lft forever preferred_lft forever
    inet6 2a00:5881:8118:400::42/128 scope global 
       valid_lft forever preferred_lft forever
    inet6 2a00:5881:8100:100::4/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::f3a0:a4ac:c0a9:c38e/64 scope link stable-privacy 
       valid_lft forever preferred_lft forever

didier58

Salut @ljf,

Problème supplémentaire suite a la dernière mise à jour 3 services impossible à redémarrer et connexion ssh admin impossible uniquement en tant que root et connexion web admin fonctionne.
Voir la version qui c’est installer:

L’architecture du serveur est bare-metal armhf

Le modèle du serveur est Olimex A20-OLinuXino-LIME

Le serveur utilise le noyau Linux 4.19.62-sunxi

Le serveur utilise Debian 10.9

Le serveur utilise YunoHost 4.2.2 (testing)

yunohost version : 4.2.2 (testing)
yunohost-admin version : 4.2.1.1 (testing)
moulinette version : 4.2.1 (testing)
ssowat version : 4.2.1 (testing)

les services qui ne démarre pas sont les suivants retour de diagnosis:

=================================
Services status check (services)

[ERROR] Service fail2ban is failed :frowning:

  • You can try to restart the service, and if it doesn’t work, have a look at the service logs in the webadmin (from the command line, you can do this with ‘yunohost service restart fail2ban’ and ‘yunohost service log fail2ban’).

[ERROR] Service uwsgi-app@ffsync is failed :frowning:

  • You can try to restart the service, and if it doesn’t work, have a look at the service logs in the webadmin (from the command line, you can do this with ‘yunohost service restart uwsgi-app@ffsync’ and ‘yunohost service log uwsgi-app@ffsync’).

[ERROR] Service uwsgi-app@searx is failed :frowning:

  • You can try to restart the service, and if it doesn’t work, have a look at the service logs in the webadmin (from the command line, you can do this with ‘yunohost service restart uwsgi-app@searx’ and ‘yunohost service log uwsgi-app@searx’).

Si cela te dit quelque chose et toujours pas de connexion au travers du vpn.

didier58

Hello,

j’ai creusé un peu de mon côté sur ma brique de test et chezmoiçamarch™

En comparant nos rêgles iptables, je constate que chez toi tu as dans la partie NAT:

Chez moi j’ai juste:

*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A POSTROUTING -o tun0 -j MASQUERADE

Les règles supplémentaires chez toi semblent venir de Docker (ou d’un relicat de Docker) …

Je ne sais pas si tu as encore des apps docker installées mais naivement j’essayerais:

  1. de désactiver le daemon docker avec systemctl stop docker
  2. peut-être recharger le firewall avec yunohost firewall reload
  3. valider qu’il n’y a plus de règles iptables liées à docker avec iptables-save | grep -i docker (cette commande n’est rien censée renvoyer)
  4. attendre 5-10 bonnes minutes histoire que …
  5. te reconnecter au hotspot wifi et tester si tu arrives bien à accéder à des sites en ipv4

@Didier58 : pour ton autre soucis à propos des services, c’est peut-être dû à des changements dans la testing

Pour creuser, c’est cool si tu peux partager les logs des 3 services affectés en allant dans Services > … les services en question … > Partager le log avec Yunopaste (je ne sais plus exactement le nom du bouton)

Salut @Aleks,

Voici les liens pour les logs,

Service fail2ban is failed:
https://paste.yunohost.org/naxijinupa

Service uwsgi-app@ffsync is failed:
https://paste.yunohost.org/qunijixiru

Service uwsgi-app@searx is failed:
https://paste.yunohost.org/sewedaboxa

Salut @Aleks,

Cela n’a pas l’air de marcher et la commande iptables-save | grep -i docker renvoi ce qui est joint ci dessous:

:DOCKER - [0:0]
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
-A DOCKER -i docker0 -j RETURN

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.