Re: tunnel cifs share with other port than 139

Jeff Layton <[email protected]>
Newsgroups gmane.linux.file-systems.cifs
Message-ID <[email protected]>
On Thu, 2009-07-09 at 22:52 +0200, Ernst Blaauw wrote:
> Hi,
> 
> As my home computer (Ubuntu 9.04) has a Samba server enabled, I cannot
> use the port 139 and 445 to tunnel a cifs share to my Network Media
> Tank running DropBear. Therefore, I tried the following:
> 
> ssh -f -N -L 2139:localhost:139 -L 2445:localhost:445
> [email protected] -i /home/user/.ssh/nmt/id_rsa_root.openssh -p
> 2022
> 
> and then:
> 
> smbmount //localhost/share /home/user/nmt -o
> port=2139,username=nmt,password=1234,ip=127.0.0.1
> 
> After this, I receive the error:
> 
> retrying with upper case share name
> mount error(6): No such device or address
> Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
> 
> Without using a tunnel it works normally, but that's not safe over
> internet.
> 
> Can someone help me to tunnel cifs over a different port range than
> the standard ports 139 and 445?
> 
> Thanks! Ernst

The port= option was broken in recent kernels until very recently. The
fix should be in 2.6.31 when it comes out (and may have gotten pushed to
stable...I don't recall).

-- 
Jeff Layton <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.