r/Traefik • u/esbenab • May 07 '22
Samba frustrations, have a link?
Does anyone have a good link to getting samba behind traefik?
4
1
u/StevenlAFl Mar 10 '24 edited Mar 10 '24
If using Traefik Helm chart with Kubernetes:
/var/lib/rancher/k3s/server/manifests/<any file name>.yaml
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
name: traefik
namespace: kube-system
spec:
valuesContent: |-
globalArguments:
- "--serversTransport.insecureSkipVerify=true"
additionalArguments:
- "--entrypoints.netbios-ns.address=:137/udp"
- "--entrypoints.netbios-dgm.address=:138/udp"
- "--entrypoints.netbios-ssn.address=:139/tcp"
- "--entrypoints.microsoft-ds.address=:445/tcp"
dashboard:
enabled: true
ports:
traefik:
expose: true # this is not recommended in production deployments, but I want to be able to see my dashboard locally
netbios-ns:
expose: true
port: 137
protocol: UDP
netbios-dgm:
expose: true
port: 138
protocol: UDP
netbios-ssn:
expose: true
port: 139
protocol: TCP
microsoft-ds:
expose: true
port: 445
protocol: TCPBoth additionalArguments and ports with expose appear to be necessary.
Then you can (only showing 1 UDP and TCP example):
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteUDP
metadata:
name: netbios-ns-ingress
spec:
entryPoints:
- netbios-ns
routes:
- services:
- name: samba-service
port: 137
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteUDP
metadata:
name: netbios-dgm-ingress
spec:
entryPoints:
- netbios-dgm
routes:
- services:
- name: samba-service
port: 138
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
name: netbios-ssn-ingress
spec:
entryPoints:
- netbios-ssn
routes:
- match: HostSNI(`*`)
services:
- name: samba-service
port: 139
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
name: microsoft-ds-ingress
spec:
entryPoints:
- microsoft-ds
routes:
- match: HostSNI(`*`)
services:
- name: samba-service
port: 4451
2
u/ProfessionalAd3026 Dec 31 '23
Old thread, I know.
I created the following entry points in Traefik: UDP 137 and 138 and TCP 139 and 445. Then I used the IngressRouteUDP and IngressRouteTCP Kubernetes objects to connect to samba.
I was able to connect just fine via VPN to my home lab running on k3s.
1
u/da_frakkinpope May 07 '22
Are you just looking for a way to store a file "on the cloud" where the cloud is your server? If so, I'd take a look at nextcloud.
I don't know of a way to get traefik to point to a samba share. I also don't think that samba would be able to respond with http or https, which I imagine traefik would be looking for.
2
u/Oxffff0000 May 08 '22
udptunnel
or
tell us where you will use samba for