pychromecast icon indicating copy to clipboard operation
pychromecast copied to clipboard

Cannot connect to chromecast on different subnet

Open cpw opened this issue 5 years ago • 1 comments

It seems that a recent firmware change has rendered chromecast unable to talk to clients on different subnets.

I have a network that has some public IPs. I've been running home assistant on a public IP for some time (with appropriate security). Until recently (earlier this year), home assistant had no problem seeing the chromecasts on the internal wifi network (not public IPs, obviously).

It seems that something has recently changed that means all chromecasts are now sending RST for any connection from a different subnet. I spent some amount of time investigating and I've come to the conclusion that this must be some new attempt to lock down chromecast security. /shrug

I realize that there is probably little you can do to fix this - it's not really in your realm of control, but after a bunch of googling it seems not many people are aware of this change, and this seems to be something that's going to suffer as a result.

A significant thing to note,that you should probably fix: I get a 403 from the 8008 port query prior to the 8009 connection attempt. It might be possible for you to note that and flag that it's unconnectable due to different subnet? (I was using forced host in the home assistant config).

*   Trying 10.0.0.245...
* TCP_NODELAY set
* Connected to 10.0.0.245 (10.0.0.245) port 8008 (#0)
> GET /setup/eureka_info?options=detail HTTP/1.1
> Host: 10.0.0.245:8008
> User-Agent: curl/7.52.1
> Accept: */*
> 
< HTTP/1.1 403 Forbidden
< Content-Length:0
< 
* Curl_http_done: called premature == 0
* Connection #0 to host 10.0.0.245 left intact

(not on the same subnet) vs

*   Trying 10.0.0.245...
* TCP_NODELAY set
* Connected to 10.0.0.245 (10.0.0.245) port 8008 (#0)
> GET /setup/eureka_info?options=detail HTTP/1.1
> Host: 10.0.0.245:8008
> User-Agent: curl/7.52.1
> Accept: */*
> 
< HTTP/1.1 200 OK
< Access-Control-Allow-Headers:Content-Type
< Cache-Control:no-cache
< Content-Length:1573
< Content-Type:application/json
< 

when on the same subnet. (The host is identical, I have simply mapped a second vnic onto the box).

cpw avatar Apr 24 '19 23:04 cpw

I don't seem to have this issue.. My chromecasts live in a separate IoT vlan (192.168.3.xx) and my laptop is living in 192.168.4.xx. I can control / get status from my chromecast units when developing/debugging my chromecastcontrol program on my laptop. I'm also able to cast videos from phones living in 192.168.4.xx.

tbowmo avatar Sep 18 '19 06:09 tbowmo