I have a server (named "head") which is linked to two networks, which are not inter-connected. On network-1, a folder is shared by server (named "server1") through NFS. This folder is then mounted on "head" as: /public/server1. I want to share folder: /public on "head" to machines on network-2, by which, collaterally, I intend all machines on network-2 be able to access contents on "server1" by mounting NFS folder head:/public and accessing folder: /public/server1. I tried this but failed. The machine on network-2 can only see a blank folder of /public/server1 without the content on "server1". How can I achieve what I wanted? Thanks.

migrated from stackoverflow.com Oct 3 '11 at 15:23

This question came from our site for professional and enthusiast programmers.


What you're asking for is something of an NFS proxy. They exist, but the free ones are terrible and the commercial ones are ridiculously expensive. However, you don't really need what you've asked for.

If your "head" server is linked to two networks, you can simply have it act as a router for systems on network-1 to access systems on network-2. For example, if network-1 is and network-2 is, and head is on network-1 and on network-2, and your filesystem on network-2 is, then your network-1 clients would have a route like this:

route add gw

This would tell the clients to route access to via (aka "head"). This presumes that you have routing enabled on your head system.

With this solution, you don't need to worry about re-exporting anything; the clients are simply accessing the fileserver directly as you're already able to do from your head node.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.