raspberry-pivpn

VPN On RaspberryPi Prevents Data Shipping Out from WeeWx


I have a raspberryPi 4 running raspberryPi debian OS and I use it as a weather server with Weewx. This server connects to a gateway that brings in data from my Ecowitt. Last week, I decided to add a VPN to the Pi using nordVPN's CLI and it was working great! I had to whitelist some ports for accessing locahost web interfaces like my plex server but all seemed good. I could still access the web interface for the weewx data as well. About a week later, with the pi still connected to a vpn, I realized the weather data from Weewx was no longer being collected or shipped out to external sources. Even the internal localhost site where I can see the data was available but there was no data in there. What is happening here and what do I need to do to run the VPN and get weewx data at the same time?

Thanks in advance.

I tried looking for info on ports I might need to open or somewhere in the config that might be messed up but nothing has worked yet.


Solution

  • I did some digging because the internet did not have an easy answer and was able to solve this. The NordVPN cli by default disables LAN discovery. I found this simply by doing

    $ nordvpn settings
    Technology: NORDLYNX
    Firewall: enabled
    Firewall Mark: 0xe1f1
    Routing: enabled
    Analytics: enabled
    Kill Switch: disabled
    Threat Protection Lite: disabled
    Notify: disabled
    Auto-connect: disabled
    IPv6: disabled
    Meshnet: enabled
    DNS: disabled
    LAN Discovery: disabled
    Allowlisted ports:
    22 -    24 (UDP|TCP)
    80 -    81 (UDP|TCP)
    137 -   139 (UDP|TCP)
    445 (UDP|TCP)
    9091 (UDP|TCP)
    14580 (UDP|TCP)
    32400 (UDP|TCP)
    45000 (UDP|TCP)
    

    and to fix this, you do this:

    $ nordvpn set lan-discovery enabled
    Just a little heads-up: Enabling local network discovery will remove your private subnets from the allowlist.
    
    LAN Discovery is set to 'enabled' successfully.
    

    and then restart weewx

    $ sudo service weewx restart
    

    and this fixed it for me!