Git Product home page Git Product logo

Comments (6)

Raksha-CPU avatar Raksha-CPU commented on August 27, 2024 1

Hello,

Great news! Adding the net.ipv4.ip_unprivileged_port_start did the trick, allowing the turnserver to function without needing root privileges. The process was straightforward to set up on both VM and AKS platforms. And most importantly, everything is working perfectly.
Thank you once again for the remarkable turnserver.

from eturnal.

sando38 avatar sando38 commented on August 27, 2024
apiVersion: apps/v1
kind: Deployment
metadata:
[...]
            capabilities:
              add: [CAP_NET_BIND_SERVICE]
[...]

I am not 100% sure, but does it work, if you use NET_BIND_SERVICE instead of CAP_NET_BIND_SERVICE ?

from eturnal.

Raksha-CPU avatar Raksha-CPU commented on August 27, 2024

Hi,

I tried using NET_BIND_SERVICE but unfortunately, I'm still encountering the same problem.

I came across an article that mentioned AKS doesn't support binding to privileged ports for non-root users.
https://learn.microsoft.com/en-us/azure/aks/developer-best-practices-pod-security#:~:text=When%20you%20run%20as%20a%20non%2Droot%20user%2C%20containers%20cannot%20bind%20to%20the%20privileged%20ports%20under%201024.%20In%20this%20scenario%2C%20Kubernetes%20Services%20can%20be%20used%20to%20disguise%20the%20fact%20that%20an%20app%20is%20running%20on%20a%20particular%20port.

It seems I need to build the Docker image with a root user instead of using the eturnal user. Could you please guide me on the necessary changes to make in order to run the image as a root user?

from eturnal.

sando38 avatar sando38 commented on August 27, 2024

Here are the build instructions.

In the Dockerfile comment this line. This will run the container by default as root.

Afterwards, build the image and push it to your container image registry.

Probably in that case your deployment needs adjustments in this way as well.

apiVersion: apps/v1
kind: Deployment
metadata:
[...]
          securityContext:
            readOnlyRootFilesystem: true
            runAsUser: 0
            runAsGroup: 0
            runAsNonRoot: false
            privileged: false
[...]

from eturnal.

sando38 avatar sando38 commented on August 27, 2024

Before building, you may try this as well:
https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#safe-and-unsafe-sysctls
https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#setting-sysctls-for-a-pod

net.ipv4.ip_unprivileged_port_start

from eturnal.

sando38 avatar sando38 commented on August 27, 2024

Glad it works now. Thanks for the feedback. We will include this into the documentation as well.

from eturnal.

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.