You can’t unless you use an external service: Outbound IP Address - #8 by kurt
(I never got the time to do so myself, but) You can experiment binding the outgoing connection (socket) to a public IPv6 address that is assigned to the VM to see if that works: Static egress IP - #4 by ignoramous
Also see: Set/get outgoing IP address for whitelisting on external APIs/Hosts
If you control code deployed to both the host and its downstream dependencies, another way I can think of that IDs a set of hosts is to add a secret https-only header (like a bearer token).