Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to config nfs to go through iptable firewall?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
davidshen84
Guru
Guru


Joined: 09 Aug 2008
Posts: 321

PostPosted: Tue Jun 09, 2009 9:18 am    Post subject: how to config nfs to go through iptable firewall? Reply with quote

Hi,

mount.nfs would use port 111, 2049 and a dynamically assigned port to communicate with nfsd. so, i cannot config my iptable rules to allow the dynamic port.

i have search the web, and find some information for other linux distro. but none of them would apply to gentoo. i hope some one could help me here.
_________________
David Shen
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Tue Jun 09, 2009 11:51 am    Post subject: Reply with quote

nfs over a firewall is possible but a major p.i.t.a.

In most cases it is better to just use Samba or sshfs, fish or something else.

Edit: This is true for NFS v3. Also NFS v3 is totally unencrypted.

NFS v4 should provide encryption and configurable ports for exactly this situation. But I never tried it.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3526

PostPosted: Tue Jun 09, 2009 12:49 pm    Post subject: Reply with quote

Are you trying to get NFS to yourself through the firewall, or server it to others?

If it's just for your own use, I'd suggest using OpenVPN and let it go through the tunnel, and let the tunnel through the firewall. Much simpler.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
davidshen84
Guru
Guru


Joined: 09 Aug 2008
Posts: 321

PostPosted: Tue Jun 09, 2009 1:01 pm    Post subject: Reply with quote

depontius wrote:
Are you trying to get NFS to yourself through the firewall, or server it to others?

If it's just for your own use, I'd suggest using OpenVPN and let it go through the tunnel, and let the tunnel through the firewall. Much simpler.


actually, the nfs server is in my LAN, and I use it only from within the LAN. it is ok to turn off the firewall at all. but i just want to know if it is possible to config the nfs to work with iptable.
_________________
David Shen
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3526

PostPosted: Tue Jun 09, 2009 3:47 pm    Post subject: Reply with quote

davidshen84 wrote:
actually, the nfs server is in my LAN, and I use it only from within the LAN. it is ok to turn off the firewall at all. but i just want to know if it is possible to config the nfs to work with iptable.


In that case, I'd keep the firewall tight and keep the NFS inside. Though I get the impression that nfsv4 can be set up securely, in general nfs is well-known for its lack of security. In a general sense, I suspect you're asking if iptables has a portmapper helper module. A quick perusal, and I don't think they do - at least it doesn't appear to be stock, though maybe someone has written one as an add-on. In general, portmapper is mentally tied to nfs, and friends don't help friends get nfs (or portmapper) through a firewall.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
davidshen84
Guru
Guru


Joined: 09 Aug 2008
Posts: 321

PostPosted: Wed Jun 10, 2009 1:43 am    Post subject: Reply with quote

depontius wrote:
davidshen84 wrote:
actually, the nfs server is in my LAN, and I use it only from within the LAN. it is ok to turn off the firewall at all. but i just want to know if it is possible to config the nfs to work with iptable.


In that case, I'd keep the firewall tight and keep the NFS inside. Though I get the impression that nfsv4 can be set up securely, in general nfs is well-known for its lack of security. In a general sense, I suspect you're asking if iptables has a portmapper helper module. A quick perusal, and I don't think they do - at least it doesn't appear to be stock, though maybe someone has written one as an add-on. In general, portmapper is mentally tied to nfs, and friends don't help friends get nfs (or portmapper) through a firewall.


thanks, i got it ;)
_________________
David Shen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum