First of all, sorry about the late reply. Could you better execute on the frontend a
onevm show -j ${$VROUTER_VM_ID} | jq -r '.VM.USER_TEMPLATE.ONEGATE_VNF_WG_PEER0|@base64d'
That should be the peer information that you can use to connect to the private network. If you save it in your client’s /etc/wireguard/oneconn you should be able to connect with a wg-quick up oneconn.
About the problem with onegate, that may have to do about permissions. Please let me check it.
Ok I see peer information with the command you supplied is that supposed to be different from what has been generated in wg0.conf file that shows up in vrouter? my goal is to have two vrouter at different sites talk to each other over wireguard how would I make the next vrouter take that peer infor it seems to genrerate something new if I straight edit wg0.conf it doesnt survive reboot or maybe I am going about it completly wrong
I think I see what I might ber doing wrong the vrouter wireguard setup seems to be geared toward clients like a laptop or phone to connect to vrouter and the networks I guess I am looking for vrouter to vrouter with different subnets should I be looking at a different approach?
That is right, the tunnel interface is created over an an APIPA range, that is not routed. The VNF wireguard idea is allowing clients the access to a private network.
Currently, if you want to link different network segments, I think that the best you could do is setting your own wireguard server on the same network segment as the private network and open the access to it on the Virtual router setting static DNAT as indicated in vr_nat4 · OpenNebula/one-apps Wiki · GitHub , so if you have your WG server running on 10.11.12.13:43210, your public interface is on eth0 and you want to have the WG server accessible on the port 43210, you could add to the context the following line
oh I get it now I am basically using vrouter outside of what is was meant for I was basically using it lieu of opnsense which I use to handle my wireguard site to site connections. This is the wrong tool for this job but you suggestion might work for my needs.
Thanks
Just a update for future readers, I did get OPNsense installed as firewall and works pretty well and actually chatgpt helped a lot in getting the setting just right for a working firewall but am going to try Bruno suggestion as a test on a another network. Will post the results