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

revalidate Gateway selection #38

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Conversation

T0biii
Copy link
Member

@T0biii T0biii commented Apr 3, 2024

  • Test if node is still on the best GW
  • Move Duplicate code in functions.sh
  • add new Function in functions.sh (use_api_best_gw, init_vars, check_mesh_vpn, check_wireguardkey, check_NTP, setup_connection)
  • use_api_best_gw to get the best gateway from the broker(atm v2 Endpoint, needs a new Endpoint on the broker) including a bool if the nodes that checks should switch (generally if GW are not LoadBalanced)
  • check-bestgateway.sh: Script to check and do something if broker response with we should switch
  • check current peer public key againts public key of best gw

the check if are we on the best gateway would produce some background traffic every x mintues so it would be good to disable the check on the client? (Web gui?)

More Ideas how we can do this:
Send the Peer Publicy Key/Name or something to the broker and only send clients the bool(should switch) if are affected to switch gw (Client should check nevertheless if the best gw public key is a different public key)

wusel42 pushed a commit to ffgtso/community-packages that referenced this pull request Jun 10, 2024
* Updated: checkout action

* Update Makefile

* Updated: checkout action

ffka-gluon-web-usb-wan-hotplug: i18n/de.po: fix typo (freifunkMUC#13)

ffmuc-gluon-mesh-vpn-wireguard-vxlan: add package (freifunkMUC#6)

Co-authored-by: Annika Wickert <[email protected]>
Co-authored-by: krombel <[email protected]>
Co-authored-by: Martin Weinelt <[email protected]>
Co-authored-by: lqb <[email protected]>
Co-authored-by: lqb <[email protected]>
Co-authored-by: Julian Labus <[email protected]>
Co-authored-by: Tristan Helmich <[email protected]>
Co-authored-by: goligo <[email protected]>

Update Makefile

* Wonder how that worked

* Remove reverse synchronization of gluon.mesh_vpn.enabled

* Renamed ffmuc-gluon-mesh-vpn-wireguard-vxlan to ffmuc-mesh-vpn-wireguard-vxlan

* Only add ip6tables rule, if not set already

For each reconnection checkuplink was adding an additional entry to the INPUT chain in ip6tables. In case a node does not have WAN connection, but accidentally enabled mesh over VPN, this adding 1440 rules per day or about 40k rules within a month.

* Adapted checkuplink for changes nslookup output in OpenWrt 22.03

In OpenWrt 22.03 the output of nslookup as a colon after "Address", so it was not matched correctly by our regular expression.

* Add mesh-vpn to BATMAN, as Gluon does not do it anymore

Gluon v2022.1 has been refactored in a way, that a mesh-vpn interface is no longer in the network configuration and no longer added to BATMAN automatically, so we now add it explicitly in our script.

* Revert "Add mesh-vpn to BATMAN, as Gluon does not do it anymore"

This reverts commit fd5f1c7.

* Add mtu() to wireguard provider API

Required by recent upstream changes:
freifunk-gluon/gluon@7c81897

* Add compatibility variable for enabling mesh vpn

* Add wireguard_pubkey.sh to be more compatible

Required as part of gluon-mesh-vpn-core:
https://github.com/freifunk-gluon/gluon/blob/v2022.1/package/gluon-mesh-vpn-core/files/lib/netifd/proto/gluon_wireguard.sh#L32

* Fix broken grep

This fixes the broken grep to find the batctl gw

---------

Co-authored-by: Felix Golatofski <[email protected]>
Co-authored-by: goligo <[email protected]>
Co-authored-by: Grische <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant