FingerlessGlov3s / OPNsensePIAWireguard

This script automates the process of getting Wireguard setup on OPNsense to connect to PIA's NextGen Wireguard servers. It will create Wireguard Instance(Local) and Peer(Endpoint) on your OPNsense setup.
BSD 3-Clause "New" or "Revised" License
179 stars 29 forks source link

Failed to list OPNSense WG Instances #65

Closed kristofferls closed 3 months ago

kristofferls commented 7 months ago

Hi! Thank you for all your hard work!

Im stuck at the point in the tutorial where Im to execute the script to set up the WG instance etc. I get this HTTP error:

DEBUG:JSON validation successful. DEBUG:Getting OPNsense WireGuard Instances DEBUG:Starting new HTTPS connection (1): 127.0.0.1:443 DEBUG:https://127.0.0.1:443 "GET /api/wireguard/server/searchServer/ HTTP/1.1" 502 7775 ERROR:Failed to list OPNsense WG Instances - Error message: GET Request: Failed returned non 200 status code - <!DOCTYPE html>

Request Denied

Server Error

Sorry, but something went wrong on our side.

There is nothing you can do except waiting until we fix the issue.


FingerlessGlov3s commented 7 months ago

To check it's not permissions give the user on opnsense full administrator permissions. Or download the API keys for the root account.

FingerlessGlov3s commented 7 months ago

Just found some time to test the script on my test OPNsense running 24.1.5_3, the script was able to create 2 new tunnels, from having nothing setup in OPNsense.

So it must be permissions or maybe the opnsenseURL in the config file.

kristofferls commented 6 months ago

Sorry for my late reply! I've just installed a new OpnSense instance on Proxmox, and went trough the process again. Worked flawlessly! Thank you for all your hard work!!

MrDuckenstein commented 5 months ago

Sorry for my late reply! I've just installed a new OpnSense instance on Proxmox, and went trough the process again. Worked flawlessly! Thank you for all your hard work!!

Damn, I am having the same issue and was watching this hoping for a fix!

Everything worked for me when setting my VPN's up a few weeks ago, after a power outage they all became defunct, after tweaking some things that didn't work I decided to start fresh and removed all my VPN's and started the guide from the top, however I am getting the same issue you were.

"root@OPNsense:~ # /conf/PIAWireguard.py --debug DEBUG:JSON validation successful. DEBUG:Getting OPNsense WireGuard Instances DEBUG:Starting new HTTPS connection (1): 127.0.0.1:443 DEBUG:https://127.0.0.1:443 "GET /api/wireguard/server/searchServer/ HTTP/1.1" 500 None ERROR:Failed to list OPNsense WG Instances - Error message: GET Request: Failed returned non 200 status code - {"errorMessage":"Unexpected error, check log for details"}"

The permissions for the user has not changed (I did try granting Admin permissions, no change), neither has the opnsenseURL.

I am so stuck... Any ideas on anything I can try to get it going without reinstalling Opnsense?

FingerlessGlov3s commented 5 months ago

Have you checked the logs of opnsense itself to see if it's reported what the error is, it says to check that in the returned response.

Also the webui is running on port 443 right? You haven't moved it to another port so say HAProxy can use port 443?

FingerlessGlov3s commented 3 months ago

Stale