68 Commits

Author SHA1 Message Date
Ad Schellevis
88c27bfe4c Interfaces: Other Types: VLAN - refactor to MVC framework detaching configuration using configd while. In preparation for https://github.com/opnsense/core/issues/5560 2022-02-22 15:58:25 +01:00
Ad Schellevis
92352ec4fa Reporting: Traffic - use async resolver to reverse lookup addresses. closes https://github.com/opnsense/core/issues/5536 2022-02-20 20:14:46 +01:00
Franco Fichtner
481c6f943f interfaces: PATH is not complete in dhclient-script
PR: https://forum.opnsense.org/index.php?topic=26995.0
2022-02-16 16:21:01 +01:00
Franco Fichtner
02dc1ebd93 interfaces: prevent DHCP from installing nameservers when not allowed
This was refactored previously and all the logic should live outside
dhclient-script but it seems it's only loosely handled over there.
For now put a check back in the old way and rework this later correctly
from the system.inc point of view: we do want to register nameserver
and searchdomain in the cache files, but should not add a route if
those are not required.  It would be helpful to show them in the overview
regardless (as for DNS servers) but with a hint that they are not being
used.

PR: https://forum.opnsense.org/index.php?topic=26765.0
2022-02-05 08:16:43 +01:00
Franco Fichtner
61720fe233 scripts: tabs vs. spaces 2022-01-11 11:22:03 +01:00
Franco Fichtner
d1f942af64 intefaces: simplify this one as well #5367 2021-11-29 10:57:45 +01:00
Franco Fichtner
6704426c19 interfaces: repair getenv() breakage in ea6b5bda52409 the right way #5367
Moral of the story: don't try to call backend scripts to grab env
variables that you could easily read using the acual nameserver
script sort of like dhclient-script is doing it.

ALLOWOVERRIDE is silly as we guard against that in get_nameservers().
2021-11-29 10:57:40 +01:00
Franco Fichtner
b28fa22d69 interfaces: nameserver can use same file format as others #5367
Also decouple searchdomain write from nameserver write in dhclient-script
and clear files properly.
2021-11-28 13:52:52 +01:00
Franco Fichtner
c6c7e9854d interfaces: searchdomain can use same file format as others #5367
Other directory was slightly confusing, other name even more so.
2021-11-28 13:42:38 +01:00
Franco Fichtner
99a0f1a164 interfaces: move nameserver files to /tmp #5367 2021-11-28 13:37:41 +01:00
Franco Fichtner
cc0b1b3be9 interfaces: move searchdomain files to /tmp #5367 2021-11-28 13:25:37 +01:00
Franco Fichtner
49210b3da8 interfaces: rc.newwanip(v6) changes related to #5367
o Only operate the /var/db IP files via rc.newwanip(v6)
o Consistenly flush a cache IP on a triggered reload
o Remove IPv6 address removal workaround from https://redmine.pfsense.org/issues/2627
o Assume that IP is properly checked making $cacheip != $ip a valid assumption when $cacheip is empty
o Remove creation from dhclient script
2021-11-27 13:54:06 +01:00
Franco Fichtner
aa6ffc501d interfaces: these ip files under /tmp are not being used #5367 2021-11-27 13:21:57 +01:00
Franco Fichtner
63f92e9d4c interfaces: remove code that appears uncessary
States are not bound to routers and -i combo doesn't seem to
work very well either.
2021-11-26 12:35:52 +01:00
Franco Fichtner
6d14376da3 system: use more convenient configctl call
Most of the system already uses it and users are informed about
it too.  Might just be a good time to write a little manual page
for it...

While here some use of daemon -f suggests that configctl -d should
be used more widely than it is now.
2021-11-16 21:30:57 +01:00
Franco Fichtner
f129c4682b interfaces: deprecate *up(v6) files, PPP is only user
Create a more distinguished file _uptime which could be used later
for other things.  Adjust scripting and remove unneeded cruft.
2021-10-05 10:09:12 +02:00
Franco Fichtner
dac9a74479 interfaces: if it looks like SLAAC get rid of it
PR: http://forum.opnsense.org/index.php?topic=8985.0
2021-07-20 09:27:54 +02:00
Franco Fichtner
11b5fe6e9c interfaces: deprecate SLAAC addresses on linkdown; closes #4929 2021-07-13 12:45:05 +02:00
Franco Fichtner
35aa9bf568 interfaces: back out this change until we have feedback #4929 2021-06-23 11:41:51 +02:00
Franco Fichtner
74633f4cd2 interfaces: fix lint pass 2021-06-21 05:15:02 +02:00
Franco Fichtner
f7d7fd6362 interfaces: flush IPv6 addresses on PPP interfaces #4929 2021-06-18 10:08:05 +02:00
Ad Schellevis
57f0575dcc interfaces: newwanip, clear states when address changes. for https://github.com/opnsense/core/pull/4726 2021-03-02 15:55:46 +01:00
Ad Schellevis
277ffb6ac5 Reporting / Traffic: change api output to combined in/out per row and change user interface to handle new format. closes https://github.com/opnsense/core/issues/4724 2021-02-23 16:21:25 +01:00
Ad Schellevis
13c4f8eab6 Reporting / Traffic: aggregate iftop results for https://github.com/opnsense/core/issues/4724
This is more or less a proof of concept, we probably best change the api endpoint data as well to push in/out in the same record so we can also ship the details underneath for those interested.
2021-02-21 13:23:13 +01:00
Ad Schellevis
dd2231ee54 Interfaces / Diagnostics / arp,ndp table: slow manufacturer lookups, likely after upgrading netaddr to 0.8.0. for https://github.com/opnsense/core/issues/4666 2021-02-20 00:43:04 +01:00
Ad Schellevis
4186f2bbe5 Reporting / traffic: add "top talkers" tab which shows the current (and max) bandwith usage per ip address sorted by total (in+out).
some people seem to miss the numbers, since the top host graph uses the same information over time, it wouldn't hurt to add a tab containting the raw numbers for the selected interfaces.
The current version doesn't limit the number of results, we might need to add a limit at some point in time, depending on how many results iftop samples.

general remarks:

o total amount of traffic is not being displayed, although we could count the "cumulative" from iftop, the numbers would always be flawed (since sampled with an interval)
o no reverse lookups, maybe for a future version, let's first see if this helps.
o hosts not seen for 120 seconds will automatically be removed from the list (fixed ttl)
2020-12-25 15:14:13 +01:00
Franco Fichtner
6e2375b044 src: fix a couple of copyright header misalignments 2020-11-19 16:26:23 +01:00
Ad Schellevis
496c4bbc0e interfaces: list mac addresses, phase out netaddr.eui.ieee.OUI_REGISTRY_PATH. closes https://github.com/opnsense/core/issues/4364 2020-09-21 16:28:33 +02:00
Ad Schellevis
d7279fba60 Reporting / Traffic: ditch status_graph.php and replace with new mvc statistics page. 2020-09-04 18:40:25 +02:00
Ad Schellevis
6cc719a507 Reporting / Traffic: hook iftop stats script into configd, sort by top usage and add address tag (local, private) 2020-09-04 17:10:55 +02:00
Ad Schellevis
37ad98237b Reporting / Traffic: add iftop stats script 2020-09-03 21:54:43 +02:00
Ad Schellevis
222f8c41c9 Reporting / Traffic: proof of concept code for a traffic view replacement using chart.js (part 2)
o refactor data collection action, use interface unique names (lan, wan, opt1, ...)
o reduce data fetch calls, update both graphs in the same poll
o hook in color labels from chartjs-plugin-colorschemes.js
2020-09-02 21:40:30 +02:00
Ad Schellevis
1229c0ca4b Reporting / Traffic: proof of concept code for a traffic view replacement using chart.js 2020-09-01 18:34:28 +02:00
Ad Schellevis
bc342e1eef Interfaces -> Diagnostics -> Netstat : add listen-queue-sizes in Socket tab 2020-08-19 20:36:06 +02:00
Ad Schellevis
656543c572 Interfaces / Diagnostics: add netstat treeview for https://github.com/opnsense/core/issues/4013
We migh consider ditching diag_sockets.php in 20.7 as well, since the socket output combines sockstat(1) and netstat(1).
2020-04-03 18:09:57 +02:00
Ad Schellevis
56a75b538d Interfaces -> Diagnostics -> ARP table: use libxo to extract data, eases parsing a bit 2020-04-02 12:01:07 +02:00
Franco Fichtner
9f10421ac6 scripts: PSR12 style fixes test drive
Mostly spacing around = , + - etc with a dash of conditional
formatting madness, but rules are rules.
2019-10-07 16:17:37 +02:00
Ad Schellevis
f5c2f7760b list_arp.py oops, forgot the hostname clause. for https://github.com/opnsense/core/issues/3595 2019-07-26 21:08:46 +02:00
Ad Schellevis
eb0e73607e use shared dhcpd lease reader in list_arp.py, closes https://github.com/opnsense/core/issues/3595 2019-07-26 11:34:02 +02:00
Ad Schellevis
3a0b9e1620 arp list, first dhcp lease missing in list_arp.py, closes https://github.com/opnsense/core/issues/3595 2019-07-25 08:30:16 +02:00
Ad Schellevis
2f69282b28 python3: replace subprocess.call in src/opnsense/scripts/interfaces/* for https://github.com/opnsense/core/issues/3574 2019-07-23 16:29:51 +02:00
Franco Fichtner
e9f2862bd7 interfaces: background configd reconfigure; closes #2267 2019-06-07 11:15:43 +02:00
Ad Schellevis
11d64579ce python3, use symlink in already converted scripts 2019-05-13 13:00:49 +02:00
Ad Schellevis
404f796eb8 python2->3 scripts in src/opnsense/scripts/interfaces 2019-05-13 11:37:01 +02:00
Franco Fichtner
be9a1c94ab interfaces: small tweaks in PPP link scripts for #2267 2019-03-26 21:16:54 +01:00
Franco Fichtner
0e95b0f407 interfaces: remove rc.kill_states
There's no real world evidence this works or is needed today.
We do have to other state kills / flushes now, one works and
the other may be defunct.  To progress this remove this arcane
script and if the need arises rewrite it as something portable.

See:      https://redmine.pfsense.org/issues/1629
Also see: https://redmine.pfsense.org/issues/2887
2019-03-21 18:33:18 +01:00
Franco Fichtner
8f9a89e643 interfaces: fix permission 2019-02-25 08:28:06 +01:00
Franco Fichtner
75c3100ba7 interfaces: move mpd.script to scripts dir
mpd5 is started with -d /var/etc so it expects mpd.script to be there.
Some small simplifications along the way.
2019-02-25 08:23:50 +01:00
Franco Fichtner
cfc95122f2 interfaces: move ppp-related scripts to proper location
sbin/ is for console-bound binaries.
2019-02-25 08:23:50 +01:00
Franco Fichtner
90c0c395a5 interfaces: check for valid alias IP #3197
Suggested by: @tbandixen
2019-02-15 11:26:14 +01:00