• 0 Posts
  • 41 Comments
Joined 3 years ago
cake
Cake day: June 26th, 2023

help-circle

  • Yeah, its known that setting up an nvidia card is notoriously hard on linux. I believe Linus T had something nice to say about them. But what you’re looking for does exist and can be setup with a little bit of tinkering.

    Personally, I use NixOS, so I just have to add a few lines of code to my nix flake. Here are the directions

    Then you just add an environment variable for the applications you want to run. If you don’t use Nix and want to set it up manually, as always the Arch Wiki comes into play. See section 1.3.1.2.

    To sum that up, install the nvidia drivers through the package manger, mod probe the kernel, and add some udev rules. You’ll need to add those environment variables again for any application you want to use the gpu.

    Edit: I forgot to mention its called Nvidia Prime. If you search the distro of your choice plus that it should help.









  • tux7350@lemmy.worldtoSelfhosted@lemmy.world•Docker security
    link
    fedilink
    English
    arrow-up
    5
    ·
    10 months ago

    Course, feel free to DM if you have questions.

    This is a common setup. Have a firewall block all traffic. Use docker to punch a hole through the firewall and expose only 443 to the reverse proxy. Now any container can be routed through the reverse proxy as long as the container is on the same docker network.

    If you define no network, the containers are put into a default bridge network, use docker inspect to see the container ips.

    Here is an example of how to define a custom docker network called “proxy_net” and statically set each container ip.

    networks:
      proxy_net:
        driver: bridge
        ipam:
          config:
            - subnet: 172.28.0.0/16
    
    services:
      app1:
        image: nginx:latest
        container_name: app1
        networks:
          proxy_net:
            ipv4_address: 172.28.0.10
        ports:
          - "8080:80"
    
      whoami:
        image: containous/whoami:latest
        container_name: whoami
        networks:
          proxy_net:
            ipv4_address: 172.28.0.11
    

    Notice how “who am I” is not exposed at all. The nginx container can now serve the whoami container with the proper config, pointing at 172.28.0.11.


  • tux7350@lemmy.worldtoSelfhosted@lemmy.world•Docker security
    link
    fedilink
    English
    arrow-up
    7
    ·
    10 months ago

    Well if your reverse proxy is also inside of a container, you dont need to expose the port at all. As long as the containers are in the same docker network then they can communicate.

    If your reverse proxy is not inside a docker container, then yes this method would work to prevent clients from connecting to a docker container.









  • Ahhh interesting video! I appreciate the post. I see the mTLS is more about authenticating who the client is outside the application.

    Don’t worry, Im not just exposing thing willy nilly 🤣 For client-side authentication I use Authentik combined with 2FA, Duo, and fail2ban. Authentik provides identity management through LDAP to jellyfin and any sign in request goes to MFA and you get a Duo notification to approve. You can do other MFA, i just havent set it up.

    Ive got a lot of family who use my server. Asking them to install a TSL cert on every machine would be impossible. My method also monitors all sign in requests. Setting up Authentik was a hugggeee game changer for me.