LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-17-2009, 12:38 PM   #1
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
NFS problems with firewall (iptables)


Hello All,

Ok, so I don't know what I'm doing wrong. I've been at this for a few days now and I can't seem to get NFS working though the firewall.

I am running Centos 5.2

First I edited the /etc/sysconfig/nfs file and uncommented/edited these entries...
Code:
LOCKD_TCPPORT=32769
LOCKD_UDPPORT=32769
MOUNTD_PORT=892
STATD_PORT=662
Next I ran the system-config-securitylevel and I added 111(tcp/udp), 32769(tcp/udp), 892(tcp/udp), 662(tcp/udp), And I even put a check next to NFSv4. Here is the output of iptables -L

Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
RH-Firewall-1-INPUT  all  --  anywhere             anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere            icmp any
ACCEPT     esp  --  anywhere             anywhere
ACCEPT     ah   --  anywhere             anywhere
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:mdns
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ipp
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:nfs
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:sunrpc
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:sunrpc
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:filenet-rpc
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:filenet-rpc
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:pftp
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:pftp
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:892
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:892
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited
I added this in my /etc/exports
Code:
/data    *(ro,sync)
And started nfsd/portmap
Code:
[root@centos-virt sysconfig]# service nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
[root@centos-virt sysconfig]# service portmap start
Starting portmap:                                          [  OK  ]
And I STILL can't mount the share

I get an error about "no route to host"...but when I do a iptables -F I can mount it just fine...

Thoughts/Help?

Thanks,

-C

Last edited by custangro; 01-17-2009 at 12:45 PM.
 
Old 01-17-2009, 12:47 PM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
Look at the last line on your output from
Code:
iptables -L
Quote:
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
 
Old 01-17-2009, 02:09 PM   #3
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979

Original Poster
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by irishbitte View Post
Look at the last line on your output from
Code:
iptables -L
Still doesn't make sense...then why does SSH and HTTP work and NFS doesn't?

-C
 
Old 01-17-2009, 05:55 PM   #4
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
Not sure, but I think ssh and http don't depend on iptables as much as NFS. It is a bit out of my depth though.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables Firewall Router Nat Problems Aps Linux - Networking 5 07-28-2006 03:49 AM
firewall / iptables problems using kmyfirewall on 2.6.16.13 pbhj Slackware 3 05-08-2006 07:10 AM
Slackware 10.0 - using NFS with iptables firewall tinman77 Linux - Networking 2 02-05-2005 07:12 PM
Performance problems with iptables and bridging firewall DarkSun4241 Linux - Networking 2 05-28-2004 09:26 PM
Firewall IPTABLES HalfLife problems bongen Linux - Networking 4 12-17-2002 03:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:01 PM.

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