LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux > 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

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 09-01-2009, 04:31 PM   #1
ggeeoo
LQ Newbie
 
Registered: Dec 2005
Distribution: Gentoo
Posts: 12
Thanked: 0
NFSv4 & NAT traversal


[Log in to get rid of this advertisement]
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.
linuxgentoo ggeeoo is offline  
Tag This Post , ,
Reply With Quote
Old 09-01-2009, 10:13 PM   #2
ggeeoo
LQ Newbie
 
Registered: Dec 2005
Distribution: Gentoo
Posts: 12
Thanked: 0

Original Poster
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.
linuxgentoo ggeeoo is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 2 06-10-2009 09:35 PM
NAT & Proxy? muppski Linux - Networking 4 10-27-2005 03:14 PM
nat-traversal egarnel Linux - Networking 0 09-02-2004 11:31 AM
Nat & Https poubelle2003200 Linux - Networking 6 03-27-2004 07:02 PM
Config Nat traversal on Mandrake 9.2 superfreeswan why1957 Mandriva 0 02-17-2004 12:08 AM


All times are GMT -5. The time now is 02:44 PM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration