opnsense / core

OPNsense GUI, API and systems backend
https://opnsense.org/
BSD 2-Clause "Simplified" License
3.27k stars 727 forks source link

DHCPv6 leases adding static not working #2682

Closed RehaagJ closed 3 years ago

RehaagJ commented 6 years ago

From the Services - DHCPv6 - Leases page (https://opnsense.domain/status_dhcpv6_leases.php) using the Plus button at any active lease is supposed to open the add static DHCPv6 mapping page for the respective interface (https://opnsense.domain/services_dhcpv6_edit.php?if=lan as an example for the LAN interface), but returns to the Dashboard instead. I have seen this in 18.7, 18.7.1 and release candidates for 18.7, did not try with earlier versions.

fichtner commented 6 years ago

It would indicate missing permissions for the user maybe?

On 1. Sep 2018, at 16:22, Uica notifications@github.com wrote:

From the Services - DHCPv6 - Leases page (https://opnsense.domain/status_dhcpv6_leases.php) using the Plus button at any active lease is supposed to open the add static DHCPv6 mapping page for the respective interface (https://opnsense.domain/services_dhcpv6_edit.php?if=lan as an example for the LAN interface), but returns to the Dashboard instead.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

RehaagJ commented 6 years ago

It’s root, who can do the same thing in IPv4

fichtner commented 6 years ago

Ok, I’ll check then 😊

fichtner commented 6 years ago

No... works for me. Are you using "Allow manual adjustment of DHCPv6 and Router Advertisements" with Track Interface on LAN?

fichtner commented 6 years ago

DHCPv4 page has the same behaviour. Are you sure root has all privileges still (you can strip them)?

RehaagJ commented 6 years ago

Yes, I’m using that setting. That seems to be necessary when using more than one local subnet (on different interfaces).

fichtner commented 6 years ago

Can you see if the DHCPv4 static mapping edit page has the same issue for you? It should...

RehaagJ commented 6 years ago

I just tried again to be sure: No, the DHCPv4 static mapping edit page does not have the same issue, it's working fine. To answer the earlier question: I did not strip root of any rights. And to avoid a possible misunderstanding: I'm not saying that the DHCPv6 static mapping edit page doesn't work - it does, when I go there via menu and paste the DUID manually. What's not working is the "jumping" from the leases page to the static mapping edit page and pre-filling the DUID. The edit page doesn't open then, but I'm taken back to the dashboard.

fichtner commented 6 years ago

Thanks for the clarification. I can't reproduce this at all though. Can you try a different browser just to be sure? Maybe it is a permanently moved redirect stuck somewhere also I don't know how that would have happened. oO

RehaagJ commented 6 years ago

Strange, I was always able to reproduce this with several fresh installations I made (in virtual machines and on the current production hardware, which has been a new install with 18.7). I had tried with Safari on iOS and macOS so far, now installed Firefox on macOS - same thing. Two "specialties" come to mind: I am using 6rd on WAN, so the local interfaces that are following WAN get their prefixes from that 6rd. And I am connecting to the OPNsense box via IP address, not DNS name (because unbound insists on resolving all interfaces' addresses for the box instead of only the one I configured manually, an issue I am still investigating and might report later, need to figure out first if someone else did already). I could imagine that the latter might be relevant, sorry for not mentioning that earlier.

RehaagJ commented 6 years ago

Just made another test: The issue does not occur on the DMZ interface, which has a static IPv6 assignment. Could this be a 6rd specific problem (assuming @fichtner tested on interfaces that had some other method, like following a DHCPv6 interface)?

RehaagJ commented 6 years ago

Another observation: On the Services: DHCPv6: Leases page, the first column (interface) is empty on most of the leases. Only for the static DMZ leases, the interface is recognized. Never noticed this before, but it could explain why the URL for adding the static mapping can't be composed correctly (interface part not known).

fichtner commented 6 years ago

Yes, I suppose we should not show the add link on the lease page then. It redirects if it uses an interface that is not static IPv6. The dhcpv6 is in automatic mode and not doing too many operations unless LAN tracking uses "manual dhcpv6 and radvd" option. It's relatively new...

RehaagJ commented 6 years ago

Yes, that may be a temporary measure, but it works on pfSense, so in the long run, it should be possible to get it working.

fichtner commented 6 years ago

@Uica on 18.7.3 add button should no longer be on the lease page if the add button was defunct. Can you confirm this? See d54f50a6f

RehaagJ commented 5 years ago

Sorry, I missed that question earlier, now saw it due to the closing message. Yes, I have noticed that the add buttons are now gone on entries where the network was not detected (in my case, nearly all entries are affected). I still think it should be possible to get this fixed in the long run (interface detection should be possible also when the manual dhcpv6 and radvd option is used with tracking interfaces).

fichtner commented 5 years ago

At least it helped to diagnose, good. :) Let me see if I can fix this, but I can't put this very high on my list. For reference: the prefix is not fully known so the lookup / address match on that particular page fails.

RehaagJ commented 5 years ago

Sure, no hurry on my end, this can be worked around. There are definitely many more important issues to handle.

fichtner commented 5 years ago

26705ee0223 is probably part of the puzzle, but we'd have to guess what the suffix should be...

wget commented 3 years ago

Somewhat related, if you are interested: #4406

fichtner commented 3 years ago

Since #4406 removes the buttons when the detection fails we should focus on making the buttons appear correctly if not there now. The logic to find the interface is a bit fuzzy so we need to wait for someone else to make that observation on 21.1 now because the describe bug here is gone.