Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] the debug option doesn't check for missing network interfaces #1481

Open
4 tasks done
fusenuk opened this issue Mar 19, 2022 · 1 comment
Open
4 tasks done

[BUG] the debug option doesn't check for missing network interfaces #1481

fusenuk opened this issue Mar 19, 2022 · 1 comment

Comments

@fusenuk
Copy link

fusenuk commented Mar 19, 2022

In raising this issue, I confirm the following:

{please fill the checkboxes, e.g: [X]}

  • I have read and understood the contributors guide.
  • The issue I am reporting can be replicated.
  • The issue I am reporting is directly related to the pivpn installer script.
  • The issue I am reporting isn't a duplicate (see FAQs, closed issues, and open issues).

Describe the bug
If you remove the network interface originally specified when setting up pivpn then (at least with wireguard) the iptables rule will not be correct and the VPN will not route traffic properly, but the debug script doesn't check for this, or attempt to correct it.

To Reproduce
Steps to reproduce the behavior:
Go through the pivpn setup and choose a network interface that exists, remove that interface and then try and use the VPN and the debug function.

Expected behavior
The debug option should check available interfaces and warn that the interface originally specified no longer exists.

Additional context
This is probably fairly rare, but in my scenario I moved an SD card from a Pi 3B which I had plugged in via ethernet to a Pi Zero W which only has WiFi.

I was then stuck trying to figure out why my wireguard pivpn install was not working anymore. After a bit of digging through what the debug pivpn command was checking for and fixing, I saw that it looks for the iptables rule and will add it back if it is missing but it only ever uses the interface name originally given, so for my pi3 install this was eth0 yet now on the PiZero that interface didn't exist and only wlan0 is available for active network connections.

I think it'd be good if part of the debug script section greps for the available interfaces and checks to see if the ipv4dev variable name exists in the output, if it does not then you should be able to change the ipv4dev field to then allow the debug fixer to modify the iptables rule, this fixing the network issue I experienced.

@fusenuk fusenuk changed the title [BUG] <Bug Description Here> [BUG] the debug option doesn't check for missing network interfaces Mar 19, 2022
@coolapso
Copy link
Member

coolapso commented Apr 6, 2024

Pre-archive closing, more information here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants