Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This might be a weird question, but can you have Samba "proxy" for another server? IE if mount a share on \\server1\someshare the server transparently proxies it to \\otherserver\randomshare.

Note that redirection will not work since \\otherserver is not directly accessible. The servers run Ubuntu Server 12.04.

Is there any way to do this?

share|improve this question
up vote 2 down vote accepted

If you're allowed to have \\othershare\randomshare permanently mounted on server1, mount that with smbfs and then configure Samba to serve it as someshare. Not really proxying, but it will give you the behavior asked for in the question.

Alternatively, you could turn off Samba on server1, and instead use an ssh tunnel that forwards traffic on port 139 to otherserver. See Setting up Samba over SSH Tunnel HOWTO.

share|improve this answer
Is that really better than re-exporting an NFS mount? – TheLQ May 8 '12 at 19:09
No, but you never indicated that otherserver was serving via NFS. – ckhan May 8 '12 at 19:12
Its my current solution. I was wondering if there was a better one that only uses samba – TheLQ May 8 '12 at 20:00
I see. Edited to add another possible solution using ssh. – ckhan May 8 '12 at 20:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.