YunoHost-Apps / hotspot_ynh

Wifi Hotspot app for YunoHost
GNU Affero General Public License v3.0
39 stars 19 forks source link

Wifi stops working randomly #102

Closed Thatoo closed 2 months ago

Thatoo commented 11 months ago

Describe the bug

Sometime (once a day or more recently), internet get inaccessible through the wifi. I need to restart ynh-hotspot service in the gui to have it working again.

Context

Steps to reproduce

Logs

Not sure it helps but I don't know what other log I can provide : https://paste.yunohost.org/evoqevaxos

Thatoo commented 11 months ago

When I had issue (long time ago) with a vpn that needed to be restarted, I could make a script that was checking if vpn was ok and restarting it if needed but I don't know how to make a script testing if the wifi is ok from within the hotspot.

hidrarga commented 11 months ago

From what I understand, you are using the hotspot together with the VPN client? The code between these two apps is a bit messy and produces strange behaviors, that's why I made some PR these last days in order to make things cleaner.

When the issue occurs, could you run the following:

iptables -w -nvt nat -L POSTROUTING | grep MASQUERADE

You should get something like this:

 4465  431K MASQUERADE  all  --  *      tun0    0.0.0.0/0            0.0.0.0/0           
Thatoo commented 11 months ago

Indeed, I get this :

aaa@xxx:~ $ iptables -w -nvt nat -L POSTROUTING | grep MASQUERADE
 163K   17M MASQUERADE  all  --  *      tun0    0.0.0.0/0            0.0.0.0/0           
hidrarga commented 11 months ago

Is this what you get when you don't have internet access from your hotspot? Because the NAT is correctly configured there, which means something else isn't working...

Thatoo commented 11 months ago

Yes, I launch the command when I could not get internet from my hotspot. I only need to launch this command and internet is back from again : sudo yunohost service restart ynh-hotspot

hidrarga commented 2 months ago

It should be fixed with the latest versions of vpnclient and hotspot apps