Score:0

Reverse IP lookup with docker?

cn flag

I am trying to build a docker container that advertises an SMB share, then connects to a remote host and tells that host to connect to the SMB share. In my case the remote host is across a VPN tunnel (though it could be accessible via a different interface when I'm on the same LAN as the endpoint), and it can reach my machine's tunnel IP, but I want a programmatic way of passing my machine's IP to the container.

I can get the result I want on Windows running Docker for desktop via pathping per this example, but I want to make this in a way that is OS-independent as this will also be used on Macs and potentially on Linux machines. Is there any way to get the tunnel IP of the host directly from within the docker container?

EDIT: Another note, if (from the container) I curl a webserver that is running on the same subnet as my target host and look at the logs, I see the request comes from the exact IP that I want to pass as an argument to the command I am running in the container. Not sure if that helps, but I don't have a way of accessing logs on the target device and the web server won't always be up and accessible.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.