milaq / YCast

Self hosted vTuner internet radio service emulation
Other
240 stars 93 forks source link

[How To] Get it running with a FritzBox router #86

Open udosw opened 3 years ago

udosw commented 3 years ago

The AVM FritzBox is a quite pupular DSL-router, at least here in Germany. Unfortunately, there is no way to create any kind of DNS entry or re-direction for faking the IP address of vtuner.com if you use the FritzBox as your local DNS server. You can, however, re-route IP packets to another "local" network. Here is how I managed to get YCast running with my Marantz M-CR611 in this szenario:

1.) Find out the IP address of your vtuner service: ping marantz.vtuner.com shows 8.38.76.252 as IP address. Same seems to be true for denon.

2.) You have to add this address to your local server where YCast is running. On modern Linux systems (as well on the raspberry) this should be something like the command ip -4 addr add 8.38.76.252/32 dev eth0 (replace eth0 with the name of your network interface) You'll have to configure the address in you local setup, to make it permanent.

3.) Start YCast and let it listen on this very address, for example like this /usr/bin/python3 -m ycast -l 8.38.76.252 -p 80 -c /etc/radio/stations.yml (This way I don't need a proxy server and port 80 is still available on my linux box for other things. Need to run YCast as root/root however.)

3.) In your FritzBox navigate to [Heimetz] and then [Network]. Choose the tab [Netzwerkeinstellungen] (network settings) and scroll down to [IPv4-Routen] (IPv4 routing). Klick on it. Enter a new IPv4 route. Enter 8.38.76.252 as network and 255.255.255.255 as subnet mask. As gateway you have to use the (primary) address of your Linux box (or raspberry). It usually starts with 192.168.178. if you use the standard settings of the FritzBox.

Caveat: If you have this set, you won't be able to access your vtuner.com login any more from your browser (when behind your FritzBox). But you can de-/activate it quckliy in the settings there.

Hope this is helpfull Udo