130 Commits

Author SHA1 Message Date
Ad Schellevis
c2f407ca4c Interfaces: Virtual IPs: Settings - Improve address cleanup so modifications to VIPs are less likely to end up with multiple interfaces using the same address.
With the previous code it was quite easy to move an address to another interface after which that address was configured on both (new and old).
2023-05-09 16:57:48 +02:00
Ad Schellevis
327334b0fb Interfaces: Diagnostics: Port Probe - replace with MVC version.
This appears to be the last one in Interfaces: Diagnostics, it's a simple and small netcat user interface to check if a remote host+port is accessible.
2023-04-16 14:57:28 +02:00
Franco Fichtner
2f11cf9e59 interfaces: run it 10 times in the background -.- 2023-04-16 08:52:10 +02:00
Ad Schellevis
cfd70c71b1 Interfaces: Diagnostics: Trace Route: migrate to MVC, closes https://github.com/opnsense/core/issues/6399 2023-04-15 19:03:48 +02:00
Franco Fichtner
089230252e interfaces: can break after a try 2023-04-14 11:30:35 +02:00
Franco Fichtner
947ed4925a interfaces: ensure PPP netgraph node has the proper name #4696 2023-04-14 11:06:47 +02:00
Ad Schellevis
d1468a3f82 Interfaces: Diagnostics: Ping - minor adjustments for https://github.com/opnsense/core/issues/6378, limit the maximum runtime to a day, fix form help an add source address 2023-03-16 21:35:15 +01:00
Ad Schellevis
83ccec4330 Interfaces: Diagnostics: Ping - refactor diagnostics tool (https://github.com/opnsense/core/issues/6378) 2023-03-16 20:23:22 +01:00
Ad Schellevis
331b03a21a Interfaces: Diagnostics: Packet Capture - minor bugfix in extracting interface leading to mangled interfaces in the viewer (vlan0.1.2.3 turning into vlan0) 2023-02-28 13:43:51 +01:00
Franco Fichtner
58ffdc1684 interfaces: force renew for IPv6 2023-02-21 12:36:15 +01:00
Franco Fichtner
4950460715 interfaces: force newip calls through DHCP/PPP/OVPN on IPv4
In case addresses are removed and reapplied the routes are gone
and other related interface configuration is missing.  In these
cases do a full recycle even though the address did not change
visibly (which is good that we can detect it).

Also address the "miss" of the cached address clean now that we
know DHCP should not force-update us into a missing address
scenario during a renew.

PR: https://github.com/opnsense/core/issues/6338
2023-02-21 10:50:43 +01:00
Franco Fichtner
05cc292031 interfaces: fix rename after proto addition
'proto' was set on to be deleted VLANs preventing them to be
deleted and also causing the new VLAN not to gain the proper
settings.  Likely needs a reboot on systems where this bad
state was reached since the system will not delete stray VLAN
devices it does not know about anymore/failed to delete before.

PR: https://forum.opnsense.org/index.php?topic=32225.0
2023-02-01 08:28:44 +01:00
Franco Fichtner
4b662218aa src: style sweep 2023-01-30 12:50:21 +01:00
Ad Schellevis
bb623c6033 Reporting: Traffic - bail dns resolve when no resolver is configured. closes https://github.com/opnsense/core/issues/6266 2023-01-26 17:50:51 +01:00
Ad Schellevis
d8f209420d Interfaces/Other Types/VLAN - outer vlan should be marked "ad", inner is always "q". closes https://github.com/opnsense/core/issues/5893 2023-01-20 18:57:18 +01:00
Ad Schellevis
720ffdc561 Interfaces: Diagnostics: Packet Capture - support mac addresses in "Host Address" field. closes https://github.com/opnsense/core/issues/6159 2023-01-02 17:46:38 +01:00
Franco Fichtner
b8e9bde8f8 interfaes: add -backhole to prefix route #3304 2022-12-16 12:53:31 +01:00
Franco Fichtner
4edf223b2f src: style sweep 2022-11-01 08:50:03 +01:00
Ad Schellevis
f573082418
Virtual IP MVC/API conversion (#6105) (#6109)
Refactor status page, replace menu registration and add ACL
2022-10-29 14:22:45 +02:00
Franco Fichtner
0964483780 src: style sweep 2022-10-26 20:32:20 +02:00
Ad Schellevis
7d4597efe5
Virtual IP MVC/API conversion (#6105)
closes #5984 refactors legacy pages, includes the following:

o remove type field as this seems to be redundant and confusing
o input form additions (show hide related fields)
o add button for carp type to select first unused vhid
o implement configure action, caching removed addresses in /tmp/delete_vip_{$uuid}.todo files (by the controller)
o add mode filter to search action and complete with relevant fields for our grid
o fix warning in interfaces.inc (interface_proxyarp_configure()), array creation issue
o add validation for addresses used in port forwards and outbound nat rules. previous version tried to rename forwards, we choose to be consistent when it comes to edit/delete.
o change ACL to use the new endpoints, remove "show only" ACL. we can always consider putting it back later, but the experience of only able to reach the grid likely won't be practical.
o remove old firewall_virtual_ip*.php files
2022-10-26 16:42:46 +02:00
Franco Fichtner
26ccc7839f system: remove _defaultgw(v6) file handling; closes #5900
Try to avoid touching default routes in dhclient-script which we
already partially do now.  PPPoE linkdown certainly doesn't need
to handle the file as well to remove the default route then.
2022-10-06 09:29:12 +02:00
Ad Schellevis
dbba3223f7 Interfaces: Diagnostics: Packet Capture - don't pass 0 to tcp dump (zero equals no limit) 2022-09-27 19:21:25 +02:00
Ad Schellevis
1548ae0eb7 Interfaces / Diagnostics / ARP Table - small cleanups for https://github.com/opnsense/core/pull/6016 2022-09-13 11:55:05 +02:00
moi
5f4cd3306f ARP table: IP addresses natural sort 2022-09-12 23:12:15 +02:00
moi
d5d837487f Resolves DNS only when -r arg is set + use Arp Internal DNS resolution 2022-09-12 23:03:51 +02:00
soif
de07e8dcf1 ARP Table: hostname uses reverse DNS lookup as fallback 2022-09-12 12:30:33 +02:00
Ad Schellevis
e1d8b471d0 Interfaces/Other Types/VLAN - pass proto to vlan interface for 802.1ad (QinQ) interface types.
Currently this doesn't work (yet), likely needs https://reviews.freebsd.org/D35848 so vlanproto can be set after the interface creation phase (now it's only possible to set proto there).
If `ifconfig XXXX vlanproto 802.1ad` sets the property, we do need this code to make sure we set these on QinQ parent vlan tags. As a workaround we could pass proto in legacy_interface_create() as well to make this (only) work on boot, but looking at the upstream fix, this might be something easy to pull in the near future.

for https://github.com/opnsense/core/issues/5893
2022-09-03 15:31:25 +02:00
Ad Schellevis
d8bf03d2e9 Interfaces/Diagnostics/Packet Capture - replace legacy version with new mvc variant. closes ehttps://github.com/opnsense/core/issues/5981 2022-08-30 17:35:45 +02:00
Ad Schellevis
4070ad0e2e Interfaces/Diagnostics/Packet Capture - work in progress for https://github.com/opnsense/core/issues/5981
o host field logic validator
o add remove job action
o add view action (initial version)
2022-08-29 21:16:49 +02:00
Ad Schellevis
21232cc4bd Interfaces/Diagnostics/Packet Capture - boilerplace for https://github.com/opnsense/core/issues/5981
o add basic workflow (start/stop/list)
o basic configd actions + implementation in capture.py script
o grid without actions to show current capture jobs
2022-08-28 15:45:42 +02:00
Ad Schellevis
bf11949841 Interfaces/Diagnostics/Packet Capture - boilerplace for https://github.com/opnsense/core/issues/5981 2022-08-27 16:16:45 +02:00
Franco Fichtner
61dd38ce2e interfaces: null route for delegated prefix #3304
It's still debatable if ifctl is a tool to record data
for interfaces and act on it or if the latter part should
be handled by more authorative (interface) code.

Inspired by: https://github.com/opnsense/core/pull/5992
2022-08-25 10:04:27 +02:00
Franco Fichtner
a785c129a2 interfaces: web GUI locale sorts files differently #5862
Make suffix match explicit, give it lower priority and prevent
suffix match in plain inteface match afterwards to repair the
result return logic.
2022-08-23 09:31:18 +02:00
Franco Fichtner
76278022f8 interfaces: wait for DAD to complete #5933 2022-08-16 10:40:20 +02:00
Franco Fichtner
489ae2f3c6 interfaces: DHCP is our problem child #5933 2022-08-15 13:20:41 +02:00
Franco Fichtner
e6ef454fa8 interfaces: signal address flush through rc.newwanip #5933 2022-08-15 12:14:48 +02:00
Franco Fichtner
72b04f0904 interfaces: fix interface name split for ifctl; closes #5929
Weird stuff such as "wififoo_wlan0" is now properly handled.
2022-08-12 12:07:42 +02:00
Franco Fichtner
6043b5b125 interfaces: make rc.newwanip the same as "dns reload"... #5933
... a.k.a. rc.resolv_conf_generate.  While here protect more
code with the IP change guard and clear the IP address if the
address lookup came up empty.
2022-08-11 13:53:04 +02:00
Franco Fichtner
bb4743a732 interfaces: stop DHCP from calling rc.newwanip when no changes are being done
This is a partial revert of 797c1864194 which has good intentions but rc.newwanip(v6)
isn't equipped with being called a lot of times yet.  We want to improve this for 23.1.
2022-08-02 09:04:12 +02:00
Franco Fichtner
f9ea49ae31 interfaces: manual cache invalidate for previous
Purge the file on all known dynamic spots that run a deconfigure
of some sort.  We probably need something for a forced reload as
well but for now let's see if this works in general.
2022-08-01 13:45:18 +02:00
Franco Fichtner
ef0d238ba1 interfaces: typo in script invoke 2022-07-28 21:09:04 +02:00
Franco Fichtner
e12b4ab36e interfaces: same issue when -i not given
This is only for command line use but we never know how that
might change in the future.
2022-07-27 09:22:56 +02:00
Franco Fichtner
c4be95a387 interfaces: implement ifctl -l awareness for :slaac magic
The default listing had an issue bringing in both the dhcp6c
and the slaac files.  Now act according to what we implemented
as a fallback approach for reading data files.
2022-07-27 08:59:15 +02:00
Franco Fichtner
39283ebf7c interfaces: ifctl experiment is complete #5862
Since "nameserver.sh" was a working title for when we just wanted
to make sense of the nameserver registration mess going on this
no longer fully applies for good reasons.

Change the name to ifctl.sh for leaving syntax parsing in place
and leave the symlink in sbin/ directory.  The same works nicely
for configctl.
2022-07-26 19:57:25 +02:00
Franco Fichtner
a5c02d8ade interfaces: migrate cleanup from interface_bring_down() #5862
Since we already kill routes in nameserver registrations we can
also take on the arp/pfctl magic moving the "router" file check
to its native utility.

It's debatable if we even need the pfctl or arp flush here.

To be continued...
2022-07-26 19:53:56 +02:00
Franco Fichtner
e9298024c1 interfaces: DHCP router to ifctl #5862 2022-07-25 12:03:23 +02:00
Franco Fichtner
2e2e59c1d8 interfaces: move to :slaac suffix use, fixing in ifctl #5862
This breaks the new feature in the interim since the router file
read is not yet supposed to read :slaac counterpart since the router
file is still read manually.  Refactor to follow.
2022-07-25 09:57:41 +02:00
Franco Fichtner
90db8f4d0f interfaces: widen and improve ifctl use
We do want to eventually lean on exclusive ifctl use in order to
be able to improve logic in ifctl or make adjustments really easy in
the future without missing a spot (e.g. adding scope to link-local
routers).
2022-07-22 10:54:55 +02:00
Maurice Walker
d582435b4b interfaces: add support for SLAAC WAN interfaces w/o DHCPv6 #5862; closes #5883
New script to be invoked by rtsold when Router Advertisements with
RDNSS / DNSSL information are received. Uses ifctl to create the
/tmp/$if_routerv6 file and creates the /tmp/$if_defaultgwv6 file
directly. Fixes the issue that these files don't get created when
the M and O flags in RAs are not set. Also, passes RDNSS / DNSSL
info from RAs to ifctl.
2022-07-22 09:20:12 +02:00