Chromecast can't connect to my router on school network


I am living in a school dorm. I have xiaomi 2100 ac, openwrt installed. I introduced mac adress of 2100 AC to school network whitelist just as I did with my notebooks. Xiaomi 2100 now gets internet from ethernet and distributes it to my laptops, phones and playstation. However I am not able to connect my chromecast to the xiaomi router. When I try to set up chromecast and connect to router it gives error "check internet connection. try restarting wifi router or choose a different wifi...". What causes this problem? As far as i can tell I am able to distribute internet to other devices why not to the chromecast?

probably is trying to use a custom DNS / remote IP from google and that one is blocked, you can try to put a iptables rule to redirect all port 53 packets to dnsmasq on your xiaomi 2100 ac and then use a 3rd party dns (or the defaults ones) in order to bypass and troubleshoot that issue. Probably that will fix the issue, if not the case you still can watch/monitor connections on the router and see if there is anything else and address that, if there is other things you may configure a vpn.

Let me know if you need any further guidance on how to achieve this.

1 Like

Or some kind of incompatibility between your wifi AP configuration and the device.

I have an android 11 phone that cannot connect to my AP if Frame Protection (802.11w) is disabled in the AP, it fails silently.

And I have another recent Android phones that cannot connect either to the AP and fail with no message if Fast Transition (802.11r) is activated at the same time than Frame Protection.

So if you have been enabled some options, try to disable all of them and simplify connection parameters and see if that works.

I am supposing you have updated the device to the last firmware version.

There can be hundreds of reasons that cause that failure in your device with a message so general as "cannot connect to the internet".

If other devices can connect and surf the internet with no problem, it doesn't seem a problem or routes or configuration in other parts, I would beleive the problem is the WIFI config itself and some kind of incompatibility, or something your device has activated that others don't.

If other devices use local DNS queries and the chromecast is configured to use an internet DNS server, it can be that your router is blocking DNS traffic (not so usual if you did not change that).

1 Like

Yeah, that also it could be the cause. But since stated is at a school dorm it may have the network with some rules limiting / blocking and that may be the cause also... you can quickly check trying your router and chromecast in other internet connection like 3g/4g-LTE or moving the devices to other location with a direct ISP/modem connection to double check that.


I had understood that he was the guy with access to router and who had configured it.

If he is the user, of course, there may be many restrictions in a student environment.
Worth checking, of course.

If he cannot change the config of the chromecast dns server, there is no good or easy solution, then.

I actually don't have any idea how to redirect all port 53 packets to dnsmasq. How can I monitor the connection?

That's correct, I have my own router. School has an ethernet port built on the wall. I simply connected that port to my xiaomi router.

The problem is that if the address of the DNS servers is hardcoded in your chromecast devices to an external DNS server (probably google ones) and the router of the school does not permit DNS packets to go outside, there is no easy solution.

The easy way to solve the problem would be to reconfigure chromecast DNS servers and use the local DNS server provided by the school.
But I don't know if that can be changed. I suppose that somebody has previously had that problem and solved it.

How to Bypass Chromecast's Hardcoded DNS (and... - Hugo Royer - Blog (

As you connect to your own router, and if chromecast can be configured as a DHCP client you can serve the local DNS server using DHCP and configure your router with the local DNS addresses.

If you want to bypass the local DNS servers, maybe you can configure in your router DNS Over https or DNS over TLS to get access to other DNS servers through https (that should not be blocked) or other different port.

iptables -t nat -A PREROUTING -i br0 -p tcp --dport 53 -j DNAT --to
iptables -t nat -A PREROUTING -i br0 -p udp --dport 53 -j DNAT --to

So I guess I need to use these line of codes. Where do I put these codes? And I need to change ip adresses to my local dns adress.

This is the way to add iptables rule through luci

1 Like

these are the settings I've used. under network/firewall/Port forwards section. It seems it is working now. Thanks everyone for the help.

I am not an expert in this.

But the problem is not redirecting the traffic on DNS port to your router device but having your router respond to dns queries that have destination in other IP, not its own IP.

I thinkk you should change lan to device in destination zone, as you want to redirect traffic to the device itself.

In order to your router receive the packets to other IP, it has to be assigned that IP too, is that what you made with iptables?

But by default even if your router has that IP assigned and listens to 53 port in the IP that chromecast uses as DNS, you have to configure dnsmasq to send the nos local queries to the school router (and you will have the limitations of access that the schooll imposes).

You can redirect it to internet through https for example, if 53 port is blocked.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.