toniebox-reverse-engineering / teddycloud

teddyCloud is an open source server replacement for the Boxine Cloud
https://toniebox-reverse-engineering.github.io/docs/tools/teddycloud/
GNU General Public License v2.0
454 stars 34 forks source link

[DNS][CC3235] Set DNS server or method for CC3235 Chip #229

Open inonoob opened 2 days ago

inonoob commented 2 days ago

Describe the issue you are experiencing

How can I find a better solution to set the DNS for the toniebox with the chip CC3235 without breaking the other tonieboxes in the house. I don't want to hack the kids working toniebox, yet. I have the spare one which I'm currently hacking and it seems the most difficult one to handle. No custom FW and no ESP32 features....

What type of installation are you running?

Teddycloud version v0.6.2

Steps to reproduce the issue

tried already

Limitation

SciLor commented 2 days ago

In short: You can't change the DNS entries of a CC3235 in the image. The image is encrypted and signed. You may access it unencrypted if you dump the OTA updates in teddyCloud. But this won't solve the signing problem of the firmware.

You need a configurable DHCP server or a seperate wifi.

inonoob commented 2 days ago

@SciLor Many thanks for putting the issue in the correct Repo. I'm still a bit lost about the different Repo of the project.

And thank you for your feedback. I need to think a bit more again. I wanted to check in if someone had a smarter idea :(.

BR

henryk86 commented 2 days ago

Get a cheap used WiFi router and set everything up with that. That’s the way I would proceed

inonoob commented 2 days ago

Dear all,

I've found a solution !!!

If you have a fritzbox & adguard running you can use the DNS rewrite function.

  1. Set in the fritzbox the "local DNS server" to the adguard server. This is needed so that you can see which device is hitting your adguard. This is needed to avoid only seen the fritzbox querying adguard.
  2. Your Teddycloud needs to have a fixed IP.

If you have that, in Adguard home add the following custom filters:

||prod.de.tbs.toys^$dnsrewrite=NOERROR;A;XXX.XXX.XXX.XXX,client=XXX.XXX.XXX.XXX ||rtnl.bxcl.de^$dnsrewrite=NOERROR;A;XXX.XXX.XXX.XXX,client=XXX.XXX.XXX.XXX

The code says the following: Redirect all requests for prod.de.tbs.toys to the teddy IP address but this rule is only valid for the client toniebox ip. The rest of your device still can hit prod.de.tbs.toys as usual.

What advantages does this have. You don't need to specify a DNS server in the docker-composer and I can still have the kids toniebox working as usual.

"My" Toniebox is for experimenting and for the kids to use as special Toniebox version.

Best regards

henryk86 commented 2 days ago

added that approach to the flash guide also

image