AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  ssh tunneling for secure nfs

    Posted Sun March 23, 2008 04:41 AM

    Originally posted by: SystemAdmin


    Hi

    Please help me.. I want to make ssh tunnel for nfs.

    Please provide me the steps.

    server:/test-src
    client:/test-des

    Thanks n Regards
    Amit Bist


  • 2.  Re: ssh tunneling for secure nfs

    Posted Sun March 23, 2008 05:31 AM

    Originally posted by: SystemAdmin


    What I did was
    created nfs share in server, verified with normal nfs mount in client

    bash-2.04# share
    /test -public,sec=sys:krb5p:krb5i:krb5:dh,rw

    In Client
    ssh -fN -L "3049:servername:2049" servername

    Everyting verified:
    1. netstat -na|grep 3049
    tcp4 0 0 127.0.0.1.3049 . LISTEN

    1. mount -o port=3049 -v nfs 127.0.0.1:/test /test

    But it hangs there......
    Please help

    Amit Bist


  • 3.  Re: ssh tunneling for secure nfs

    Posted Sun March 23, 2008 05:36 AM

    Originally posted by: SystemAdmin


    Will not I have to make changes in rpc portmap?


  • 4.  Re: ssh tunneling for secure nfs

    Posted Sun March 23, 2008 06:16 AM

    Originally posted by: SystemAdmin


    This time I didnt change the port no.

    ssh -fN -L 2049:server:2049 server

    still mount command freezes..
    gives error after some time
    mount: 1831-010 server localhost not responding: RPC: 1832-015 Remote system error - A remote host refused an attempted connect operation.
    mount: retrying
    localhost:/test


  • 5.  Re: ssh tunneling for secure nfs

    Posted Sun March 23, 2008 07:18 AM

    Originally posted by: SystemAdmin


    I got the solution.

    Its possible in version 4 of nfs.

    I gave the domain-name to nfs server and client

    #nfsdom server.xyz.com

    then started nfsrgyd in both.
    and exported /test in server with option nfs version 4 only
    in client,
    #mount -o vers=4 127.0.0.1:/test /test
    and it worked.


  • 6.  Re: ssh tunneling for secure nfs

    Posted Thu November 13, 2008 02:40 AM

    Originally posted by: Gileb


    Hello,
    I am also trying to mount an filesystem in NFS via a tunnel. The aim is to mount a fs via a firewall while nfs is not authorized.
    While you found a solution to your problem, i dont get it.. The solution you provide is not a tunneling solution, is it ? If yes, is it because you initialize you tunnel with the 2049 on both sides (as you dont provide the port in the mount command)?
    Thanks for you help

    Gilles