Tell container to use Port forward ip by default (not use main ip)

I’ve successfully set up port forwarding on the host. Because I can do netcat nc -l 8333 on the server in the container on the port and nc -v 151.35.26.44 8333 on my desktop and send messages successfully.

description: "coins.js"
config: {}
ports:
- description: "btc"
  protocol: tcp
  listen_port: "8333"
  target_address: 10.103.26.59
- description: "doge"
  protocol: tcp
  listen_port: "22556"
  target_address: 10.103.26.27
listen_address: 151.35.26.44
location: none

But it seems like the container is missing instruction to use the listen_address.

I can see this when I run bitcoin-cli inside the container and view the output of the command getpeerinfo because each peer shows "addrlocal" : "67.14.11.21:52790" which is my websites main ip not the listen address. It should be listen_address:random_port instead.

How do I instruct the container to use the listen address instead of the main ip?

Network forwards provide NAT forwarding to an internal IP. They do not provide the external IP inside the instance itself. For that you would need to use something like ipv4.routes on a bridged NIC or the ipv4.address on the routed NIC type:

You’ve not really explained where the 67.14.11.21 address has come from in your application? Is it hard coded in a config or is the actual local IP of the instance?