Code Monkey home page Code Monkey logo

Comments (6)

Dramelac avatar Dramelac commented on July 26, 2024 1

Hello,

The -P docker function allows to expose automatically the ports to be exposed (to random host port) declared in the image and not all the ports.

For example, the nginx docker image is built with the configuration EXPOSE 80, if a container based on this image is created with the -P option, only the declared port 80 will be exposed on the host with a random port.

PoC:

docker run --rm --name test -d -P nginx
docker ps | grep test
docker stop test

The exegol image do not configure any port to be exposed by default, so this parameter will unfortunately be useless...

Thanks anyway for the request, it could indeed have been an omissions.

Regards

from exegol.

MattPlayGamez avatar MattPlayGamez commented on July 26, 2024

Dear @Dramelac,

I see the issue in it.
Does there exists another way to publish all ports/all used ports.
It's incredibly anoying when needing to restart a container to forward the ports.

Kind Regards,
Matt

from exegol.

QU35T-code avatar QU35T-code commented on July 26, 2024

Hey @MattPlayGamez,

I assume you are using the ARM architecture, because with AMD you can use --network=host.
I had the same problem on my Mac M2. I think there are 2 solutions :

  • The first is to expose a range of ports (docker run -p 7000-8000:7000-8000)
  • The second (I prefer) is to use a VPN tunnel between your Host and your Container. Actually, I use Tailscale (https://tailscale.com). It's simple and easy to have a tunnel.

At the moment, there are not very good solutions to solve this problem with Docker.

Regards,

from exegol.

Dramelac avatar Dramelac commented on July 26, 2024

The --network=host limitation is not ARM, it's just Docker desktop so this limitation apply to Windows and Mac hosts.

For the moment the Exegol wrapper does not allow to open a list of ports unfortunately (only specifically designated ports).

One of the manual workarounds is to set up a VPN tunnel between the container and the host to bypass the docker limitation (similar @QU35T-code 2nd solution). An automatic implementation of this kind of setup might be implemented in the Exegol wrapper at some point but not at the moment.

from exegol.

MattPlayGamez avatar MattPlayGamez commented on July 26, 2024

Hi @QU35T-code,
I'm on Windows, so --network=host doesn't work.
I've also been using Tailscale, but I can't really forward ports to outside my network/devices without Tailscale.

@Dramelac I think I'm going to setup OpenVPN until there is a universal solution. But I think I still have the problems with getting a reverse shell to Exegol. Sorry to answer too late, I hadn't pinged you. I just noticed

Thanks for responding,
Matt

from exegol.

MattPlayGamez avatar MattPlayGamez commented on July 26, 2024

I'm closing the issue.
This will be resolved in the future

from exegol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.