Cannot use non unicast IP as targetUrl

Good afternoon!
I ask for help. We have two PeerTube servers and I need to use the REST API to import a certain video from one server to another. Servers on the same network.
I make a POST request to https://$server/api/v1/videos/imports
there is a variable in the request body
$play[« targetUrl »]=« https://server.corp.edu/w/uB4t6125eneAXTRQv4Ypwi »;
but I always get the same error
class stdClass#3(5) {
public $type =>
string(11) « about:blank »
public $title =>
string(9) « Forbidden »
public $detail =>
string(39) « Cannot use non unicast IP as targetUrl. »
public $status =>
int(403)
public $error =>
string(39) « Cannot use non unicast IP as targetUrl. »

if I specify any link from YouTube in the « targetUrl » field, the import is successful

link server.corp.edu/w/uB4t6125eneAXTRQv4Ypwi available.

What could be the problem?

Is there any private network on your servers?

Cannot use non unicast IP as targetUrl: this let me think that perhaps your instance domain resolves with non-public IP on your server? And these IP could be invalid?
What the result of dig server.corp.edu on your server?

Hi,

We have a security feature in peertube to prevent the import to fetch internal IPs. This feature cannot be disabled. Don’t hesitate to open an issue on GitHub - Chocobozzz/PeerTube: ActivityPub-federated video streaming platform using P2P directly in your web browser to ask a new config key for admins that trust their users.

1 Like