Skip to content
This repository has been archived by the owner on May 4, 2020. It is now read-only.

delete interfaces wireguard not working / provisioning loop #3

Open
jollyjinx opened this issue Apr 20, 2020 · 4 comments
Open

delete interfaces wireguard not working / provisioning loop #3

jollyjinx opened this issue Apr 20, 2020 · 4 comments

Comments

@jollyjinx
Copy link

jollyjinx commented Apr 20, 2020

The package itself runs fine , but I run into a provisioning loop as soon as I set

route-allowed-ips true

on one interface. I also found out that I can't:

delete interfaces wireguard

when I have one interface set to route-allowed-ips true

Side note: I do NOT have the wireguard configuration inside a config.gateway.json.
I found out that having a wireguard in config.gateway I no longer can update the USG without running in a provisioning loop.

I have a script running on provisioning that installs wireguard (if needed) and setting and saving the wireguard configuration values after a provisioning, that way I can still upgrade my usg.

@jollyjinx jollyjinx changed the title provisioning loop provisioning loop / delete interfaces wireguard not working Apr 20, 2020
@jollyjinx jollyjinx changed the title provisioning loop / delete interfaces wireguard not working delete interfaces wireguard not working / provisioning loop Apr 20, 2020
@thomas-baumeister
Copy link

You can have your configuration stored in config.gateway.json but once you upgrade the firmware on your USG to have to ssh and install wireguard again (before it reboots to reset the config).
Since this is quite a hassle, I found this useful: https://github.com/britannic/install-edgeos-packages.
Basically, you store the installation packages on the USG and they are installed whenever necessary.

Worked perfectly fine on my USG4 when upgrading to v4.4.51.

@jollyjinx
Copy link
Author

I use a similar approach with my scripts on reinstalling the software. I try to keep the unifi system to itself and only run my changes after everything unifi provisions itself. So I can reset the usg to factory default and only have to copy my config sub directory to the machine.

The main problem here is, that it's running in a provisioning loop as it has a problem when wireguard interface is to set to allow routing.
Try to do a
delete interfaces wireguard
when one is set to allow routing to replicate the issue.

@jollyjinx
Copy link
Author

jollyjinx commented Apr 21, 2020

I found a workaround last night, so that I can update and provision my USG from within the unifi webgui again - yeah. I do set the route-allowed-ips to false and use the route command to add routes to the distant network when the machine starts up. That way provisioning and updating works now seamless.

For reference for others - I have a a directory in /config which has a couple of scripts to install and runs everything I need which does not get wiped out on updating the usg.
To get the system up and running is to start the script once via config.gateway.json using system task-scheduler.

@FossoresLP
Copy link
Owner

I will look into disabling route allowed ips when removing Wireguard interfaces. Please note that I have no experience with vyatta though so it might take me some time to figure it out.

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

No branches or pull requests

3 participants