-
Notifications
You must be signed in to change notification settings - Fork 12
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
add ffuplink-package to use the routers-wan connection #125
Conversation
It would be nice to have an underhood construction which can be used by any wizard or sthg. to configure the system. Much more which kind of connection could be used. |
at the moment branch "packages/notunnel" of the firmware gets build an can then be tested. |
one issue with this code is, that the veth-link to the ffuplink interface is setup via a hotplugscript. this should be converted to a uci-setting, as we have patched the lede-17.01 netifd to support this. |
56466b2
to
f363ea3
Compare
95a577d
to
55aa54a
Compare
55aa54a
to
21f38cd
Compare
This code has been tested and verified to work with
Probably it's morre elegant to put the uci-setting ffberlin-uplink.uplink.auth directly into network.ffuplink.authtype. |
merged into Hedy-1.0.0-rc1 |
this is some uplink-type to directly route the freifunk- traffic via the uplink on the wan-interface. So there will be no tunnel at all. include both setup-stages inside the hotplug-script stage 1: WAN * setup up veth-pair * add one end of veth-pair to br-wan * enable interface "ffuplink" stage 2: ffuplink * set default-route for ff-clients via gateway over "ffuplink"-device * via policy-routing in table "olsr-tunnel"
add uci "ffberlin-uplink.uplink.auth"to give each uplink-provider a way to have the assistent asking for different kinds of authentication. Following types are supported: - none: the uplink-type don't need additional parameters - x509: the uplink-type requires a set of X.509 certificate (stored in /etc/openvpn/, as for VPN03 and tunnel-berlin) - pass: todo - just ask for a simple password / psk - userpass: todo - ask for username and password
to ensure current settings and do not interfer with any previous setup or tunnel-type of ffuplink
- this requires a recent enough netifd (was implemented in 2017-02-11) - also take care of reconfiguring alternative uplink-types and don't have them relying on any assumption of "ffuplink"
implement dedicated ip-rule to manage traffic for ffuplink-interface
this hotplug-script probibits all traffic to nodes on the upstream-network of ffuplink-interface. Only traffic to not directly attached networks is accepted. This script also sets up the default route for all traffic reaching the "ffuplink" routing-table. this all honors the settings of * ffwizard.sharenet * freifunk-policyrouting.enable
On every setup of ffuplink add some ip-rules to route all traffic received on interfaces of zone freifunk out via ffuplink. When shutting down the interface we remove the manually created rules, to not create the same rules over and over again.
as this is done by the tunnel-provider scripts
…-route so add prohibit with prio 19989
to keep it in sync with a "no-tunnel" uplink. As we had no separate ip-rules for ffuplink before, it was put into "olsr-tunnel", which did not made sense at all.
As OpenVPN networkparameters are not configured via UCI, "network_get_subnet" returns noting. In this case we query the IP-config directly. If this also returns nothing valid, we will not setup a policy to protect the uplink-lan and give an error-log.
e6fed16
to
e7c0f03
Compare
btw: a similar feature seems to be on the way for gluon (freifunk-gluon/gluon#1094) |
add a package to use the wan-connection directly (w/o VPN)