Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Adding Wireguard and VXLAN support #187

Merged
merged 9 commits into from
Aug 20, 2021
Merged

Conversation

nemesifier
Copy link
Member

@nemesifier nemesifier commented Apr 3, 2021

What's missing:

  • Fix test coverage
  • Wireguard page docs
  • Add Wireguard settings (interface and peers settings, + examples) to OpenWRT backend docs
  • Add VXLAN settings (interface settings + example) to OpenWRT backend docs

Postponed: #188.

@nemesifier nemesifier self-assigned this Apr 3, 2021
@nemesifier nemesifier added this to In progress in OpenWISP Priorities for next releases via automation Apr 3, 2021
@coveralls
Copy link

coveralls commented Apr 3, 2021

Coverage Status

Coverage increased (+0.007%) to 99.94% when pulling 6365223 on wireguard-vxlan into a0cda13 on master.

config['interfaces'][0]['addresses'] = [
{
'proto': 'static',
'family': 'ipv4',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't know whether the IP address will belong to IPv4 or IPv6 family since we are dealing with variables here.

@@ -307,7 +307,6 @@
"type": "string",
"title": "ipv4 address",
"minLength": 7,
"format": "ipv4",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was preventing to us to use variable name in templates

Copy link
Member Author

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pandafy let's make sure Wireguard is mentioned in the README (we have OpenVPN so it makes sense to mention Wireguard as well).

Copy link
Member Author

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I forgot to mention to mention WireGuard it here too: https://github.com/openwisp/netjsonconfig/blob/master/docs/source/index.rst

@@ -0,0 +1,193 @@
=================
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this file listed in the toctree? I tried generating the docs and don't see it in the menu.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No this is not in the toctree. You will see this after clicking on the VPN backends link.
Screenshot from 2021-05-26 22-10-14

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nemesisdesign can this be resolved?

@@ -0,0 +1,78 @@
============================
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this file listed in the toctree? I tried generating the docs and don't see it in the menu.

docs/source/backends/vpn/openvpn.rst Outdated Show resolved Hide resolved
docs/source/backends/openwrt.rst Outdated Show resolved Hide resolved
@pandafy pandafy force-pushed the wireguard-vxlan branch 2 times, most recently from 5aa0b36 to 51338a8 Compare May 26, 2021 20:37
.. include:: ../_github.rst

The ``VXLAN over WireGuard`` backend extends :doc:`Wireguard backend </backends/wireguard>`
to add configurations required for VXLAN.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think something like configurations required for configuring VXLAN tunnels encapsulated in WireGuard tunnels. may be more specific and clear.

option route_allowed_ips '1'

VXLAN over WireGuard
--------------------
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a misunderstanding here.

VXLAN can work independently from wireguard, so we should document it independently.

VXLAN is a layer 2 tunnel which can be encapsulated in any L3 technology, so I don't think we need to specify VXLAN over wireguard.

Maybe, we can leave one last example showing how to encapsulate a vxlan tunnel in a wireguard tunnel.

| | | | |
| | | | 2 to 15 alphanumeric characters, dashes and underscores |
+-----------------------+---------+-----------+-----------------------------------------------------------------+
| ``route_allowed_ips`` | boolean | ``False`` | automatically create a route for each Allowed IPs for this peer |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine but automatically create a route for each of the Allowed IPs for this peer flows more smoothly.

OpenWISP Priorities for next releases automation moved this from In progress to Reviewer approved May 31, 2021
mips171
mips171 previously approved these changes May 31, 2021
Copy link

@mips171 mips171 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs look good

OpenWISP Priorities for next releases automation moved this from Reviewer approved to In progress Jun 28, 2021
Copy link
Member Author

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pandafy can you address this suggestion please?
#187 (review)

The rest looks good and I think we should merge!

Copy link
Member Author

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pandafy it's ready to merge but I think we can squash/group some commits of yours to keep history tidy, please proceed when you can.

- Added examples for WireGuard, VXLAN and VXLAN over WireGuard
- Updated OpenWrt documentation to describle usage of auto_client methods
@nemesifier nemesifier merged commit b09d8a7 into master Aug 20, 2021
OpenWISP Priorities for next releases automation moved this from In progress to Done Aug 20, 2021
@nemesifier nemesifier deleted the wireguard-vxlan branch February 18, 2022 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

4 participants