0

I'm developing a bat detector and I've set up the Raspberry Pi to operate its own Apache Web server on its own access point. The idea is that client devices can then connect to the access point to access the detector's features.

However, since the web server is running on http certain browsers are blocking some javascript code e.g. geolocation.

Things tried so far:

  • When I looked into LetsEncrypt I thought I could spoof a DNS entry in the /etc/hosts file to prove ownership of a domain and have a certificate created for that, however, this is not the case.
  • I've setup self-signed SSL certificates but these are not trusted by devices which connect to the Pi.

There is a similar question at https://www.raspberrypi.org/forums/viewtopic.php?t=195822 however one of its solutions, getting a certificate for a domain that I have registered somewhere else, will not work for me since I don't have any domains.

I was wondering since the Pis is an access point can I spoof a DNS entry of a certificate authority to get a certificate to work?

Are there any ways to give an internal web server operating on the access point is own SSL certificate which connected devices will trust?

I'm at a loss of how to deal with this. I'd prefer to have an SSL certificate over implementing workarounds in javascript for the blocked APIs. However, it looks like I may have to do that.

  • Can you add a trusted certificate to the devices trying to connect? That's the proper way to do it, I believe. Even if you spoof the DNS, nobody's going to give you the private key for their domain 🙂 – Mark Smith Apr 14 at 14:19
  • Also, do you need this to be secure? Isn't knowing the access point's password enough? – Mark Smith Apr 14 at 14:20
  • @MarkSmith While technically possible, the idea would be anyone could easily connect to the device. Requiring them to add a trusted certificate would put them through a lot of hoops. Unless there is a simple way to add certificates? From my perspective it dosn't have to be secure however Chrome needs it to be to access some javascript APIs – Richard Beattie Apr 14 at 14:44
  • Use letsencrypt. The installer scripts for that do everything you need and you don't have to think about it. – Dougie Apr 14 at 17:41
  • @Dougie Will letsencrypy work without a domain registration? Surely they won't let you create certs for any arbitrary domain? – Mark Smith Apr 14 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.