Tested successfully on Ubuntu 20:
snap install core; sudo snap refresh core
snap install --classic certbot
tpeap stop
certbot certonly --standalone --preferred-challenges http -d example.com
openssl pkcs12 -export -inkey /etc/letsencrypt/live/example.com/privkey.pem -in /etc/letsencrypt/live/example.com/fullchain.pem -certfile /etc/letsencrypt/live/example.com/chain.pem -name eap -out omada.p12 -password pass:tplink
This setup has been tested successfully on GL.iNet GL-MT300N-V2
device with OpenWRT v22.
By default OpenWRT firewall does not allow web or SSH access on WAN IP. As a captive portal blocks all traffic on LAN until user is authenticated so when we initially enable captive portal on OpenWRT we lose access to the router from LAN side. To manage our OpenWRT we should therefore open access from WAN side.
Access your OpenWRT router via Luci interface. Go to Network => Firewall => Traffic Rules and add a new rule for opening port 80 (HTTP):