bolemo / pia_wg

OpenWrt PIA WireGuard Script
GNU General Public License v3.0
8 stars 2 forks source link

PIA wg interface stops forwarding traffic after a few weeks #11

Closed bwitt closed 4 months ago

bwitt commented 4 months ago

After a few weeks or so of running the wg pia connection, the wg interface will still be up and connected, but no longer responding:

# wg
interface: wg_pia
  public key: <pubkey>
  private key: (hidden)
  listening port: 37724

peer: <peer>
  endpoint: <peer IP>
  allowed ips: ::/0, 0.0.0.0/0
  latest handshake: 7 hours, 9 minutes, 36 seconds ago
  transfer: 222.89 GiB received, 66.59 GiB sent
  persistent keepalive: every 25 seconds

and when I try pia_wg.sh start (e.g. as in the watchdog cron) I get:

# ./pia_wg.sh start
WireGuard PIA interface: UP
Region is: <PIA region>
Connectivity through PIA: NOK
User is configured
Local keys are configured
Network interface options are configured
Network peer options are configured
PIA region is configured
Renewing PIA token
Error fetching PIA token!
bwitt commented 4 months ago

note along with https://github.com/bolemo/pia_wg/pull/12 I also had to follow https://openwrt.org/docs/guide-user/services/vpn/wireguard/extras#dynamic_connection to ensure the default route for my wan interface is preserved when the wg interface comes up.

bolemo commented 4 months ago

Thanks @bwitt :) I would not have caught this as I am not sending all my traffic through the VPN, but only selected marked packets.