Skip to content

Commit

Permalink
dhcp-server: implement captive portal option (RFC8910)
Browse files Browse the repository at this point in the history
Clients observing the URI value "urn:ietf:params:capport:unrestricted"
may forego time-consuming forms of captive portal detection.

Clients obsering a different URI will check that for infos.

https://datatracker.ietf.org/doc/html/rfc8910
  • Loading branch information
herbetom committed Jan 7, 2025
1 parent 9a9d749 commit 4debad6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dhcp-server/dhcpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ option space ubnt;
option space omada;
option ubnt.unifi-address code 1 = ip-address;
option omada-controller-address code 138 = ip-address;
option captive-portal-url code 114 = text;

class "ubnt" {
match if substring (option vendor-class-identifier, 0, 4) = "ubnt";
Expand Down Expand Up @@ -44,6 +45,7 @@ shared-network "{{ name }}" {
option omada-controller-address 5.1.66.255;
}
option interface-mtu 1280;
option captive-portal-url "{% if net['network'] == "10.86.8.0" %}https://ffmuc.net/captive{% else %}urn:ietf:params:capport:unrestricted{% endif %}";
{%- endif %}
{%- endfor %}
}
Expand Down
4 changes: 4 additions & 0 deletions nginx/domains/ffmuc.net.include
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ location /favicon.ico {
root /srv/www/ffmuc.net/_site/assets/;
}

location = /captive {
default_type application/captive+json;
}

# Point SSID-URL to ffmuc.net
rewrite ^/(uml_.*|muc_.*|gauting|freising|augsburg|welt|ulm)$ https://ffmuc.net redirect;

Expand Down

0 comments on commit 4debad6

Please sign in to comment.