LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-01-2009, 03:31 PM   #1
ggeeoo
LQ Newbie
 
Registered: Dec 2005
Distribution: Gentoo
Posts: 12

Rep: Reputation: 0
NFSv4 & NAT traversal


I have to use NFS behind a NAT so I decided to try NFSv4 since traversing NAT with NFSv3 is not possible. On the server I have the following configuration in /etc/exports:
Code:
/export       *(rw,fsid=root,insecure,no_subtree_check,async,all_squash)
/export/test  *(rw,nohide,insecure,async,no_subtree_check)
On the client I give
Code:
mount -t nfs4 -o tcp nfs4_server:/test /mnt/test
The problem is that the above command works just fine when the client is directly connected in the same network as the server, but it doesn't work when the client is connected via NAT (the configuration of client is otherwise the same). It fails with the following error:
Code:
mount.nfs4: Operation not permitted
So the problem seems to be caused by NAT.

This seems strange to me: in NFSv4, the client establishes a single outbound tcp connection to the server (on the remote port 2049). Why is NAT causing a problem to that? After all, I can successfully establish this tcp connection using netcat.
 
Old 09-01-2009, 09:13 PM   #2
ggeeoo
LQ Newbie
 
Registered: Dec 2005
Distribution: Gentoo
Posts: 12

Original Poster
Rep: Reputation: 0
Ok, I don't know why, but the following worked:

I changed the following line in /etc/exports, from
Code:
/export/test  *(rw,nohide,insecure,async,no_subtree_check)
to
Code:
/export/test  *(rw,fsid=1,nohide,insecure,async,no_subtree_check)
Apparently, nfs couldn't assign an fsid to /export/test automatically for some reason (maybe because /export/test is actually a bind mount) so I had to do it manually. I don't see how this relates to the NAT issue though.
 
  


Reply

Tags
nat, nfs, nfsv4



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS IPSec Tunnel Mode with NAT-Traversal azrael808 Linux - Security 4 11-23-2012 03:37 PM
NAT & Proxy? muppski Linux - Networking 4 10-27-2005 02:14 PM
nat-traversal egarnel Linux - Networking 0 09-02-2004 10:31 AM
Nat & Https poubelle2003200 Linux - Networking 6 03-27-2004 06:02 PM
Config Nat traversal on Mandrake 9.2 superfreeswan why1957 Mandriva 0 02-16-2004 11:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration