Pi MusicBox & AccessPoint

Hey everyone,
I hope this can be fixed easily…

I need my RPi to play music and act as an WLan Access Point.

Installing MusicBox was super easy. Configure the Raspi to act as a WLan Router was a bit tricky but worked in the end, except that all http traffic is somehow redirected to the musicbox webserver.

Connection to AP ist OK
DHCP Server ist OK and provides client with IP, DNS, GW address
DNS is OK, google.com -> correct IP Address
I can use Apps on my Mobile - Google Maps, Email, WhatsApp, … all working

If I open any url in the browser, all traffic is redirected to the musixbix webserver.
Any idea?

Cheers
Norkas

musicbox uses the following command. I don’t really know much about how your setup is supposed to work but could this be your problem?

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 6680

Thanks a lot! That was the solution.

I altered this line not to take all tcp traffic but only the IP of the Pi WLan interface
iptables -t nat -A PREROUTING -p tcp -d 192.168.66.1 --dport 80 -j REDIRECT --to-port 6680

works perfectly!
Cheers

Great, thanks for letting us know it worked. AP support has been on the road map for some time so this fix is probably going to be useful.

Have you had any problem with the I.P. address being changed by avahi-daemon?

I have a similar set-up using latest Mopidy with Jessie, but I’m only using the wifi as a repeater.

This is what comes up in the syslog

“Nov 7 07:27:37 raspberrypi avahi-daemon[487]: Withdrawing address record for 192.168.0.9 on br0.
Nov 7 07:27:37 raspberrypi avahi-daemon[487]: Leaving mDNS multicast group on interface br0.IPv4 with address 192.168.0.9.
Nov 7 07:27:37 raspberrypi avahi-daemon[487]: Interface br0.IPv4 no longer relevant for mDNS.
Nov 7 07:27:37 raspberrypi dhcpcd[486]: br0: deleting route to 192.168.0.0/24
Nov 7 07:27:37 raspberrypi dhcpcd[486]: br0: deleting default route via 192.168.0.1
Nov 7 07:27:38 raspberrypi dhcpcd[486]: br0: soliciting a DHCP lease
Nov 7 07:27:38 raspberrypi dhcpcd[486]: br0: offered 192.168.0.13 from 192.168.0.1
Nov 7 07:27:39 raspberrypi ntpd[601]: Deleting interface #9 br0, 192.168.0.9#123, interface stats: received=162, sent=202, dropped=0, actiime=43205 secs”

It does this 2 or 3 times a day.

My phone and other things stay connected and can still connect to the internet, but I can’t access the webclient on the same address.

I have tried various settings in the /etc/network/interfaces file including making br0 static but it makes no difference.

If you don’t experience similar problems could you tell me what you needed to change in the Pimusicbox set up to run it as an access point.