-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question about port mapping #463
Comments
I'd suggest using local DNS and to point different subdomains for different samba services pointing to the same IP of your containerisation host. Then you could use reverse proxy server to handle requests to different subdomains to docker host ports of smb services accordingly (map the ports of proxy container to be responsible for the usual ports of smb). Maybe(!) there'll be a need in proxy server with stream capabilities, like Haproxy or Traefik, but much simpler Caddy could also do that if you build an image with unofficial layer4 module (it's not hard at all), or you could try Nginx Proxy Manager, which is even simpler than Caddy having WebUI |
The client connection is fine on Linux, but not on Windows. The default port is used. If the specified port seems to have to be changed a lot, do you have any good suggestions for mounting directories on the server that you want to mount in Windows? |
Only some thoughts: Is ping on the smb server works from windows machine? While samba4 as a share server could be easily configured to use ports other than 139/445, it seems that windows cannot be configured in that way (considering server role), which in turn rises a question if windows as a client works flawlessly connecting to non-standard ports... My suggestion remains the same - local DNS and reverse proxy, so that you won't need to use non-standard ports for client connections and as a bonus could use domain names as Share1, FamilyPhotos, etc |
Thanks for your reply, I still don’t quite understand, because I really want to use k8s to deploy multiple samba for different users, so I can’t use the default port. What do you need to do through dns or nginx? I’m not sure about this I'm not very familiar with it. Could you please explain it in detail? Or it would be better if there is a reference document. |
Hello, I am now using docker to deploy samba. Instead of using the default port, I specify port mapping 139 and 445. The deployment command is as follows:
But when I use windows to link, I get an error
![image](https://private-user-images.githubusercontent.com/38779388/358184020-eaa5e01f-2456-4239-b531-bfa128ece0d0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxODA0NjgsIm5iZiI6MTczOTE4MDE2OCwicGF0aCI6Ii8zODc3OTM4OC8zNT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U1OTMxMjlhNDUwNWZmNGM1ZTc5NWZkYTdlNGU2MTRjNjFkMmQzOGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.HrSWjHaTwcB4MXntJk0jROwTp1p_TU7XnGbcFv3YfRg)
Use under linux
I would like to ask if this means that port mapping cannot be specified. If I want to deploy multiple Samba services, will it not work?
The text was updated successfully, but these errors were encountered: