jessgofi
2 years agoReel Rookie
ECP returning 403 Forbidden from AWS requests
We have a set of Roku devices in a LAB which we connected to our VPN and AWS.
In AWS we are running a CI tool which we want to use with the devices, and the devices are correctly responding to the CI host calls:
tmp-shel:~# nc -vz 100.101.250.39 8085
Connection to 100.101.250.39 8085 port [tcp/*] succeeded!
tmp-shel:~# nc -vz 100.101.250.39 8060
Connection to 100.101.250.39 8060 port [tcp/*] succeeded!
tmp-shel:~# nc -vz 100.101.250.39 80
Connection to 100.101.250.39 80 port [tcp/http] succeeded!
tmp-shel:~# telnet 100.101.250.39 8085
Connected to 100.101.250.39
However, when we attempt any request to the ECP, we receive 403, i.e:
tmp-shel:~# curl -vo /dev/null -s -w "%{http_code}\n" http://100.101.250.39:8060/query/device-info
* Trying 100.101.250.39:8060...
* Connected to 100.101.250.39 (100.101.250.39) port 8060 (#0)
> GET /query/device-info HTTP/1.1
> Host: 100.101.250.39:8060
> User-Agent: curl/8.0.1
> Accept: */*
>
< HTTP/1.1 403 Forbidden
< Server: Roku/12.0.0 UPnP/1.0 Roku/12.0.0
< Content-Length: 0
<
* Connection #0 to host 100.101.250.39 left intact
403
tmp-shel:~# curl http://100.101.250.39:8060/keypress/Home -X POST -d '' --verbose
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 100.101.250.39:8060...
* Connected to 100.101.250.39 (100.101.250.39) port 8060 (#0)
> POST /keypress/Home HTTP/1.1
> Host: 100.101.250.39:8060
> User-Agent: curl/8.0.1
> Accept: */*
> Content-Length: 0
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 403 Forbidden
< Server: Roku/12.0.0 UPnP/1.0 Roku/12.0.0
< Content-Length: 0
<
* Connection #0 to host 100.101.250.39 left intact
The same actions work with no issue from our VPN:
ā ~ curl http://100.101.250.39:8060/keypress/Home -X POST -d '' --verbose
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 100.101.250.39:8060...
* Connected to 100.101.250.39 (100.101.250.39) port 8060 (#0)
> POST /keypress/Home HTTP/1.1
> Host: 100.101.250.39:8060
> User-Agent: curl/7.87.0
> Accept: */*
> Content-Length: 0
> Content-Type: application/x-www-form-urlencoded
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 202 Accepted
< Server: Roku/12.0.0 UPnP/1.0 Roku/12.0.0
< Content-Length: 0
<
* Connection #0 to host 100.101.250.39 left intact
ā ~ curl -vo /dev/null -s -w "%{http_code}\n" http://100.101.250.39:8060/query/device-info
* Trying 100.101.250.39:8060...
* Connected to 100.101.250.39 (100.101.250.39) port 8060 (#0)
> GET /query/device-info HTTP/1.1
> Host: 100.101.250.39:8060
> User-Agent: curl/7.87.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: Roku/12.0.0 UPnP/1.0 Roku/12.0.0
< Content-Length: 3297
< Cache-Control: no-cache
< Content-Type: text/xml; charset="utf-8"
<
{ [1348 bytes data]
* Connection #0 to host 100.101.250.39 left intact
200
Per the similar post for 403 forbidden, this is usually fixed by using the device IP, but I am already doing it that way.
I have generated a tcpdump, and it shows the request made it to the Roku device, and then it rejected it.
Any insight would be appreciated.