4 ms·
How do I connect to CIFS on non-default port?
by ComodoHacker 10y ago
How do I connect to CIFS on non-default port?
- captainmuon 10y agoThe only way I found was to use (cygwin ssh) port forwarding to map that port to the standard one, kill the default network SMB process (which restarts), and hope my process wins the race. Then you could access the remote shares at \\127.0.0.1 . I think I also managed to create a loopback device, put it into its own subnet, and map the port to that device, and then it was possible to do e.g. \\192.168.100.56, but it was a pain to set up. The reason I needed this was, I wanted to run samba as non-root on a remote host (on a non-privileged port), and forwarded that with ssh though a firewall. This way I could access my files on the remote Linux server from my windows desktop. One problem is that windows does not tolerate hanging connections much, and a bad or lost connecting can freeze your program or require a reboot. I'm not sure how much is the kernels fault and how much you can code around this.
- ComodoHacker 10y agoDirty hacking as it is. In similar situations I just use SFTP.
- int_19h 10y agoI've seen UNC paths with port number before, so I assumed that it's possible; but apparently those are for WebDAV. Of course, this means that it should be doable with WebDAV instead of CIFS. Which would probably mean even worse perf, but still potentially acceptable... Can WebDAV paths be used without mounting them to a drive letter first, though?