How to make a server without public network ip open “getway” or "api" for others

I have a machine named A running at home, so this machine has no public network ip. I run “ipfs daemon” on this machine.
I want to open A’s ipfs getway and api to a machine named B that doesn’t run the ipfs daemon, so that the B machine can download the ipfs file via the http connection use A’s getway.