Commit Graph

48 Commits

Author SHA1 Message Date
Tim Wilkinson 2235d3229c
Fix dns alias validation pattern to allow wildcard DNS again. (#1203) 2024-05-14 22:39:47 -07:00
Paul K3PGM 650e26667c
Improvements and fixes for Advanced DHCP Options (#1197)
- The "Always" checkbox now works for options with an explicit tag, and
is disabled for untagged options; the latter cannot be supported because
of a limitation in the OpwnWRT configuration language.
- Tagging by host name has been removed; it didn't work before and isn't
particularly useful in the AREDN context.
- Tagging by Agent Circuit ID, Agent Remote ID, and Subscriber-ID are
now supported so that a DHCP Relay Agent can be used to extend the LAN
across multiple subnets.
- Small improvements were made to error handling and hints.
2024-05-14 09:46:25 -07:00
Tim Wilkinson d8b85d5b4a
Fix library requires (#1147)
* Another attempt to stop the mesh page from being truncated sometimes

* Fix originator

* Fix the require(...) libraries
2024-04-01 22:15:45 -07:00
Paul K3PGM 35316299c1
Deduplicate and sort tag names in Advanced DHCP Options selector. (#1078)
* Deduplicate and sort tag names in Advanced DHCP Options selector.

* Only build the deduplicated list of tag names once.

* Build DHCP option tag table more efficiently.
2024-01-22 18:27:12 -08:00
Paul K3PGM 4e35b2f0c6
First draft of advanced DHCP option specification on Ports tab. (#1073)
* First draft of advanced DHCP option specification on Ports tab.

Allows the node administrator to specify additional DHCP options that
will be supplied to LAN clients in specific circumstances. This change
adds two tables to the Ports configuration tab.

The "Tags for Advanced DHCP Options" table allows the administrator to
specify DHCP tags that will be assigned to clients that identify
themselves with specific values for properties such as Vendor Class or
MAC address.

The "Advanced DHCP Options" table allows the administrator to specify
arbitrary DHCP options to send to any client, or only to clients with a
specific tag. Option numbers can be entered directly or chosen from a
list of well-known options. Option values are manually entered by the
administrator.

In-browser validation is implemented for all input fields with easily
recognizable content such as host names, MAC addresses, and port and
option numbers. Placeholders are also supplied for input fields, such as
MAC addresses with wildcard matching, that might otherwise be difficult
to describe.

Issues with the current version:
- Sending DHCP options not requested by the client is implemented using
the dhcp_option_force UCI configuration option, but does not currently
work.
- Tagging by client host name is supported by dnsmasq, but not yet by
UCI.
- DHCP option values must be entered manually by the administrator, but
are not currently validated.

* Better validation, placeholders, and hints for existing input fields.

* Remove junk accidentally inserted in comment.

* Preserve Advanced DHCP options across updates.
2024-01-21 17:25:16 -08:00
Tim Wilkinson 14494a477f
Add missing Request class to luci.http (#1026)
This was removed in the latest OpenWRT but we still use it.
Original plan was to just provide the old http (as ohttp) along
side but too many third-party apps also need this.
2023-12-17 16:20:41 -08:00
Tim Wilkinson 4120914a60
Improve node setup (#996)
* Reworking the node-setup system - less reboots when changing configuration

* Add restart-services to advnet
2023-12-12 20:01:23 -08:00
Tim Wilkinson 475f371bb8
Initial OpenWRT 23.05.0 merge (#963)
* Initial OpenWRT 23.05.0 merge

* Fix get_rfchannels for new iwinfo format

* Fix initial wlan name

* Move patches to 5.15 from 5.10

* Fix flash write problem on Ubiquiti devices

* Use new ssl patch

* Reduce binary sizes

* Have to have hostapd installed now, even on tiny builds

* Simplify device support

* Revert Mikrotik NAND sysupgrade system.
OpenWRT doesnt really support Mikrotik NAND devices after 2019 and the
new support appeared broken. So reverted to the 2022 mechanism which does
work and avoid upgrade problems.

* Fixes for tiny builds

* More tiny shrinking

* Fix newly added firewall rules

* Update permanent packages

* Update permanent packages

* Support for Nanobeam 2AC (2.4GHz) device. 20MHz channels only.

* Update support

* Add GL.iNet B1300

* Add to radios.json

* Update supported devices

* Dont force the LAN DHCP to run

* Revert CURL SSL test

* Fix radio count when there are no radios

* Switch the lan ports on the gl-b1300

* Add support for GL.iNET Beryl MT1300

* Fix visual lat/lon setting bug

* Make the setup "Save Changes" button also save the location data

* Fix location/map system with geo location fallback

* Recolor

* Fix default bandwidth selection

* Support multi-band radios

* Generic mechanism to set compat version to 1.1

* Switch ethernet ports

* 20 MHz channels only

* Update docs

* Add ham channels to Mediatek chips (20MHz only)

* Automatically update the permpkg list when we upgrade

* Fix 10MHz mode for Ubiquiti AC devices

* Fix tiny builds

* Bump the watch timeout for restarting olsrd
olsrd is reliable these days, and very occasionally this
was restarting it unnecessarily
2023-12-06 10:12:11 -08:00
Tim Wilkinson 11f7fe6731
Support wildcard DNS subdomains (#935)
* Support DNS sub-domains

* Support wildcard domains
2023-09-18 16:47:48 -07:00
Tim Wilkinson eaa5d2f72b
Allow & in service paths (#889) 2023-07-03 23:19:15 -07:00
Tim Wilkinson 794d6caa89
Tidy up the formatting and fix column widths (#809) 2023-04-27 22:12:57 -05:00
Tim Wilkinson deeacc2cc2
Restructure, modularize and tidy the navigation buttons and menus (#805)
* Make admin and user bar menus pluggable

* Realign header block to stop is moving around

* Remove ref

* Use modular nav to disable ineligable options during initial install

* Dont offer tunnel menus options when no tunnel daemon installed.
This is for low-memory devices

* Simplify

* Improve messaging when running ram image

* Disable rather than hide vpn menu items on tiny memory devices

* Move menu navs
2023-04-25 20:07:19 -07:00
Tim Wilkinson 5657bfcdf8 Dont let services uses hostname which are not propagated.
OLSR doesnt allow this.
2023-03-26 22:37:43 -04:00
Tim Wilkinson dd0cc3ba2e
Validate state of services over a period of time before disabling advertisements (#751)
* Track validation state of hosts and services. Only remove a host/service if it fails multiple times in a row.
* Let new addresses/services be valid for a while regardless
* Initially unknown addresses will be valid for a while
* Reset validation state when services updated
2023-03-16 16:02:08 -04:00
Tim Wilkinson 6fba065d2d
Ignore unexpected output causing bad gateway error (#591) 2022-12-25 07:13:04 -06:00
Tim Wilkinson 6950479bf1
Update AREDN to OpenWRT 22.3.2 (Major Upgrade) (#574)
* Update to Openwrt 21.02 and add support for the CPE710 v1
Update scripts to change references to ifname to device due to a change in Openwrt naming
reverse-wpad-basic-wolfssl and disable SSL on Curl

NOTE: The compile host must have python3-distutils installed for gpsd to build

* aredn: initial working upgrade to openwrt 21.02.1

* aredn: update 1 to working upgrade to openwrt 21.02.1

* aredn: add cpe710v1 to build config

* Andrew's patches

* Remove duplicates + display perl

* Temp disable wifi extension patch

* ifname/ports support

* Add spectrum patch back in

* Generic function to extra interfaces

* New api to get wifi ifname

* Disables jails

* Style link

* aredn: partial upgrade to openwrt 22.0.3.0

added AC device images and partial migration to 22.0.3.0
firewall upgrade pending

* aredn:  update mesh-release and revert config.mk

* Unused

* NFT firewall rewrite

* Common-isze configs

* Fix network layout for hap2

* Use local packages dev (new firewall rules)

* Add HAP2

* Add pause after network restart to let bridge reinitialize

* Various lua fixes for new lua version

* Tweak config

* Re-fix networking (lost patch change)

* Add new radio names

* Tolerate missing wifi

* Fix hap-lite switch setup

* More devices

* New radio id

* Build Rocket 5AC lite

* Remove need for luci.sys

* Remove need for luci.sys

* Explicitly name wlan interfaces

* Handle different compatibility verisoning

* Update networking for switches

* ipref version bump

* Extra flag for curl

* Better compat_version fix

* Remove wolfssl

* Fix dns server

* Fix device name

* Unused

* Remove things we dont need

* Remove unused packages

* Generic macaddr overrides

* Fix uci commit

* Fix luci.template.parser to avoid luci.http loading the real thing

* Rocket-M build

* Add search-domain dhcp option

* Turn of ipv6

* No IPV6 in dnsmasq

* Override mac addresses if devices all  the same

* Working from master (for now)

* Put back hostap

* Disable old ethmac fixup

* Tweak configs

* Move back to v22.03.2
Leave ipq4019 builds to master

* Need IPV6 to compile nft firewall

* Rocket-M fixes

* Before we start

* WIP

* Working snapshot

* Cleaned patches

* Merged patch

* Single patch to support HAP2

* Fix typo

* Add nanostation-m

* 5/10Mhz patch

* 5+10MHz patch for ath10k-ct driver

* Extend 2Ghz channel check to include -4 to -1

* Add chanbw setup for ath10k (like ath9k)

* Added TP-Link CPE710 v1

* Override firmwares

* Missing patch

* Dropbear config like 3.22.8.0

* Add Ubiquiti Rocket 5AC Lite

* Fix c6

* Update

* Need more scan channels

* Remove IPV6

* Improve mac fixups

* Put back missing nft app

* IPv6 removed so dont have to disable it

* Fix rocket-m flash bug

* Fix nanostation-m

* Nanobridge is tiny

* Fix wifi order for ar750

* Rocket M5 XW support

* New rates

* Fix firewall4 so we don't need IPv6

* Allow channel width to be restricted

* Move channel list into library

* Fix naming

* Mechanism to block specific channels on specific radios

* Refresh buttons

* routerboard-sxt-5nd

* CPE605 v1.0

* Improve rocket m xw

* tpink

* Update patch

* Update to remove disable

* Remove BW restrictions on cpe710

* Restrict to what has been tested

* Remove test BW restrictions

* sxtsq-5-ac

* Update

* Update

* powerbeam-m5-300 support

* Fix

* Fix hap2

* Tidy unused patches

* Remove limit

* Add ubnt_bullet-m-ar7241

* Added ubnt_nanobeam-ac-gen2

* Fix typo

* Tolerate missing dtd ip

* Explicitly gix hap2 mac addresses

* Fix some broken patches

* Hap2 wont work at 5MHz

* Ubiquiti LiteBeam 5AC Gen2

* Fix compat_version for sxt 5ac

* Update patch

* Unused

* Fix lan configuration for some devices

* Rolling average of noise level

* Unused

* Split out the ath10k rssi monitor (its very simple at the moment)

* Ignore .DS_Store

* Reboot if ethernet doesnt come up (but only once!)

* reboot returns - add exit

* Add some logging info

* Fix ]

* Check all possibly ethernet bridges

* Improve mac fixing

* Remove HostAP on small memory devices

* Reduce dropbear footprint

* Add setsid

* Kill hostap when upgrading to save memory

* Different way to detect hostapd unavailable

* New build steps

* Improve manager logging

* Fix name conflict for the two monitors

* Try to improve test mesh name resolve problem

* Migrate tiny to generic (tiny doesnt work properly)

* Typo

* Another attempt to fix macs for Mikrotik

* Protect against missing trackers

* Fix wpad for ipq40xx

* Remove old tunnel check code

* Enable ZRAM swap to aid low memory devices

* ath10k noise can something be out of range - protect against that

* Updated with current devices and status

* Update firmware which has been tested

* Updated with more builds

* More binary/README

* Fix css error

* Start noise at sensible base level

* Unfix the css so it looks how it use to.

* Save as much memory as we can on lowmem nodes

* Hide some options on low memory devices

* Add "eol" to 32MB devices

* Restart network rather than reboot node if it seems to be broken

* Fixes

* Revert network reset

* Fix ar750 networking

* Continue to trim tiny configs

* More devices

* Dump IW output messages

* Fix Rocket 5AC intermittent ethernet issue

* Ethernet fix for PowerBeam 5AC 500

* More tiny size reduction

* More support data

* Fixed POE and USB power features

* Add Ubiquiti NanoBeam AC (gen1)

* NanoStation (not NanoBeam)

* Add mii-tool package

* Device updates

* Bump update time to 5 minutes

* Fix ethernet negotiation for rocker-5ac and nanobeam

* Fix iplookup

* Config changes based on call feedback

* Radio listing fixes

* Update with more untested builds

* Fallback TxMbps extracted from iw station dump

* Fix tunnel detection for low memory nodes

* Remove unused feed packages

* snapshot build

* Update stability info

* Add powerbeam-5ac-500

* Typo

* Add missing 3.22.1.0

* Add MikroTik LHG 5 AC

* Fix permissions

* Fix permissions

* AirGrid's take Bullet builds

* Mikrotik AC3

* Improve supportdata structure a little to make it easier to find things

* Restore WAN VLAN overrides

* Fix vlan regex for hap2 and hap3

* Support old and new style poe controls

* hap-ac3 is version 1.1

* Handle typo in some openwrt config files

* Fix HAP AC3 install

* Update hap ac3 status

* Support user overrides for network ports (non-swconfig devices)

* LHG 5AC support

* Remove -nand

* Remove non-working platform.sh change

* tunnel weight override

* Omit LinkQualityMult when value is 1

* Add mANTBox 19s and 15s

* Support ath79 mikrotik devices which require ath10k in the initramfs

Co-authored-by: apcameron <apcameron@softhome.net>
Co-authored-by: Joe AE6XE <ae6xe@arrl.net>
Co-authored-by: Joe Ayers <joe@arrl.net>
2022-12-22 14:22:49 -06:00
VA2XJM Jean-Michel 74810d01b4
Fix port range not working (#569)
* Fix for port ranges

Fix port range validation.

* Update CONTRIBUTORS

added myself

* Update files/usr/lib/lua/aredn/utils.lua

Reverting to whitespace protection plus escaping hyppen.

Co-authored-by: Tim Wilkinson <tim.wilkinson@me.com>

* Update ports

added %s* infront of the port range input in case a whitespace has been inserted.

Co-authored-by: Tim Wilkinson <tim.wilkinson@me.com>
2022-12-22 10:31:41 -06:00
Steve eb631e4819
set min field widths on ports page (#544) 2022-11-04 21:54:04 -05:00
Tim Wilkinson 6ba17b8e5a
Snapshot hostnames after updates so we have a consistent copy to display (#488) 2022-09-06 09:58:18 -05:00
Steve AB7PA 7b768e6ce1
add svc alert icon (#461) 2022-07-31 14:12:17 -05:00
Tim Wilkinson 665fa4924f Fix missing "http" proto when checking non-links 2022-07-27 12:22:10 -07:00
Tim Wilkinson e8d90a9404 Add a visual indicator when a service is not being published. 2022-07-27 12:22:10 -07:00
Tim Wilkinson 675beca8f8
Prevent < and > being used in service names (#437) 2022-07-18 08:46:01 -05:00
Tim Wilkinson b86213a66f
LQM fixes 6 (#379) 2022-05-31 21:54:02 -05:00
Tim Wilkinson 0faf41072a
Restart manager when we restart the firewall (#378) 2022-05-30 14:56:50 -05:00
Tim Wilkinson aec90d47ae
Missing lanlimit when print port in nat mode (#328) 2022-04-08 04:15:13 -05:00
Tim Wilkinson b17f52c27d
Fix suffix and bad protocol suffix service url name checks (#269) 2022-03-07 21:41:47 -08:00
Tim Wilkinson 3dbb83fcab
Lua userpages: ports (#244)
* Ports page in Lua

* Minor fixes

* Fix adding current leases to dhcp reservations

* Show correct dns alias ip address
2022-03-01 21:13:53 -06:00
Tim Wilkinson 149b698d31
Lua userpages: setup (#220)
* Lua 'setup' page + backend node-setup
Moved old perl verison to .pl

* Make sure perl code continues to use node-setup.pl
2022-02-22 19:25:01 -06:00
Tim Wilkinson ee2791c621
Dmz mode migrate fix (#169)
* Migrate /etc/config/dmz-mode to /etc/dmz-mode

* Migrate dmz_mode into /etc/config/aredn

* Use cmd append

* Changes should be in /etc/config.mesh

* Add commit
2021-11-19 15:48:45 -06:00
Eric 2c1bd9ce0e
aredn: enhancement: Nat mode aliases
Aliases in NAT mode allows the node admin to create alias names for hosts on the LAN and then use those for creating port forwarding rules.  The aliases DO NOT effect the rest of the mesh network and are not propagated via OLSR.

NAT Mode aliases are only usable on the local LAN where the IP addresses are known and routable only on the subnet.   Since the NAT hides these IP addresses or the node masquerades, other mesh nodes and devices by definition only know about the node’s hostname.  Thus aliases on the LAN in NAT mode are not propagated by OLSR across the mesh.  You _CANNOT_ use an alias name in a service listing.

You _will_ be able to set an alternate hostname for any host on the nodes' LAN however.
A host named `CBY45-DELLLAPTOP` can also be known as `wxc-shack-laptop`. It may make remembering which host is which a bit easier.

Since OLSR does not propagate the alias,  the "Do Not Propagate" checkbox while in NAT Mode is hidden.
2020-10-07 16:20:59 -07:00
Eric e13dd2cb04
aredn: allow aliased hostnames on the mesh
Allows for aliased hostnames on the mesh. One IP/Host can be assigned to multiple hostnames.
This is useful for many things including virtual hosts, virtual machines, virtual email addresses, etc.
The possibilities are actually _endless_.

Fixes #516
2020-09-08 16:39:49 -05:00
Eric eadc184f3e fixed some formatting 2020-08-29 09:06:21 -05:00
Eric 8810e0eaaf Stop certain hostname/IP's from propagating over the mesh
Allows for the node admin to choose to have DHCP leased hostnames/IP's propagated over the rest of the mesh network or not.
Defaults to allowing the hostname/IP to propagate.

The hostname/IP will *still* be resolvable from the localnode and will show up in the list of hosts on the localnode only.
This allows for selected local mesh devices to be not available over the rest of the mesh network.
ie: switches, routers, cameras, etc.

This will work immediately for *new* DHCP leases when the checkbox is selected.
For *existing* DHCP leases, it may take a while for the network to update, if ever.
To speed up the process of full network OLSR "DNS" updating, reboot all the nearest neighbor device(s) to the node you made these changes to.
That seems to get the changes "out" to the rest of the network faster than normal.

Fixes #508
2020-08-29 09:06:21 -05:00
Eric e8b3520ec7 bugfix: Check to prevent duplicate mesh hostnames when reserving DHCP reservations (#226)
* bugfix: Check for existing hostnames on the network in DHCP reservations

fixes #216
*additional check for existing hostname when creating new DHCP lease.
checks hosts_olsr file if entered hostname already exists or not on the connected network(s).
outputs info saying such and gives advice to prefix hostname with callsign.

* change to use =~ /\s$host\S/i

* Reworded warning message

* moved the position of the hostname check to only when you click "add" on the DHCP leases page.

this stops it checking all the previously entered hostnames.
2018-10-26 21:53:14 -07:00
Conrad Lara - KG6JEI 9c0f5bf7c6 bugfix: DHCP Reservation allows duplicate hostname usage.
The DHCP Name reservation on the ports page would allow
a user to use the name of the mesh node as a hostname
for a reserved host which would mess up the remote display
of hosts on the mesh status screen.

In addition while testing the verification code it was found
that it was case sensitive while dns is case insensitive.

fixes AREDN->ticket:198

Change-Id: Ie51a594f733eca38e8547faeab0260d7b23b8818
2017-03-24 18:27:20 +00:00
Conrad Lara - KG6JEI c592f44ab0 Sourcecode license text spelling correction.
Inside the source files the word "contained" was mispelled
as "conained"

The website currently lists this correctly as "contained"

This was an error in the intial stamping of the source files in
changeset:5c3ee1d0686c6e6f2907fe4fc393d86d6c5a69b5/aredn_ar71xx

Line is part of "Additional Conditions" permitted by GPLv3.
Line does not impact coders prior to the AREDN setup date
as it was added by the AREDN team.

Change-Id: I3bc09aea548100f35c08aebe8686b8d4808d56d8
Signed-off-by: Conrad Lara - KG6JEI <KG6JEI@amsat.org>
Signed-off-by: Joe Ayers <ae6xe@arrl.net>
Signed-off-by: Darryl Quinn <k5dlq@arrl.net>
Signed-off-by: Trevor Paskett - K7FPV <snoopytjp@gmail.com>
2016-12-30 18:54:05 +00:00
Conrad Lara - KG6JEI a39abd3813 bugfix: Typo in comment header for perl scripts
This is at the top of the license header.

It prevents the code from being processed but doesn't
actually impact the license terms in any way.

Change-Id: Ic91f2400f9694056b6f06fa43d1074411d6c6262
2016-12-23 16:45:47 -08:00
AE6XE d4b7617e03 remove non-mesh modes from setup options
fixes AREDN->ticket:175

Change-Id: I7517df178a5ce82ef79ec4af844932fe6569d8da
2016-08-07 21:38:18 +00:00
Conrad Lara - KG6JEI 9c21a18f3f bugfix: IP selection dropdown list is empty on dhcp reseveration/ports page. 2015-12-20 18:52:10 -08:00
Conrad Lara - KG6JEI 9444716fbd feature: Add function and code to UI code to prepare for changing interface names in the core OS.
Create get_interface which will lookup in the current uci network config the realname for the logical interface name.

When the interface is not found it will fall back to a hard coded list.

Configure the UI to use the new get_interface function.
2015-03-24 23:25:18 -07:00
Conrad Lara - KG6JEI 39a7ab878b bugfix: Cleanup display of rebraned pages.
Add missing AREDN(TM) Logo and fix other pages that were missing the footer text.
2015-03-09 19:28:59 -07:00
Conrad Lara - KG6JEI e146193b65 Rerand from BBHN to AREDN(TM)
Since a large number of the  BBHNDev team has decided to create firmware fully independent of the BBHN Project the decision has been made to rebrand the firmware to differentiate from the origional BBHN work.

We would like to thank all those whom have worked on the BBHN firmware over the years and all those who continue to work on the firmware under AREDN(TM).
2015-03-09 16:39:04 -07:00
Conrad Lara - KG6JEI 5c3ee1d068 bugfix: Add GPLv3 license text to core BBHN Mesh files
Program went GPLv3 last year but license text was never added to files

Default text to give credit to David as he is listed in all commits and to reference the BBHN Austin team at the same time as they were part of the group of HAM's that started this project.
2015-01-18 11:36:49 -08:00
Conrad Lara - KG6JEI 1ed509132f bugfix: dhcp lease dropdown lists too many addresses.
fixes BBHN->ticket:69
2014-12-12 00:08:31 -08:00
Conrad Lara - KG6JEI 6974527e88 Add device compatibility checker with alert text
fixes BBHN->ticket:1

Units will show:

Yellow banner for devices we have not yet tested.
Red banner for devices we have confirmed do not work.

Relies on what Ubiquiti calls the board.sysid which is the
value of subsystem_device on the first PCI device.
2013-12-11 22:54:27 -08:00
Conrad Lara - KG6JEI b948d97423 Merge SDWG Mesh progress with 1.0.0 BBHN
Includes removing files that are provided by packages instead
of being embedded as binaries.

Changes made for UBNT hardware AND for newer base openwrt (Backfire)
2013-12-02 12:04:54 -08:00
Conrad Lara - KG6JEI ae2674e764 import of files/ from BBHN 1.0.0 (bbhn svn 273) 2013-11-15 06:11:16 +00:00