LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 08-08-2011, 01:50 PM   #1
drsgrid
LQ Newbie
 
Registered: Aug 2011
Posts: 8

Rep: Reputation: Disabled
cannot use NFS (or even ssh) RHEL box as server, but external mnt & ssh out work ok


Ok im trying to use my RHEL box as a NFS server and export a portion of the filesystem on the RH box to a CentOS box and cannot get the RH box configures right, i suspect it might be the firewall or somehting but i thought i disabled the RHEL firewall... here is what i have so far any thoughts?

Again I'm trying to get NFS working on my RHEL 5 box, apparently i can use the box as a client, but not as a server. If it helps i cant ssh into the box (server), but as a client ssh works fine. Ive configured

ON SERVER (RHEL):
/etc/hosts.allow:
all : all
all :all@all


setup my /etc/exports file
/opt/Xilinx av2(rw,sync,no_root_squash) 192.168.0.1/24(rw,sync,no_root_squash)


SELinux Mgmt : is disabled


[root@av2 ~]# chkconfig nfs on
[root@av2 ~]# chkconfig portmap on
[root@av2 ~]# service portmap start
[root@av2 ~]# service nfs start
[root@av2 ~]# system-config-nfs
[root@av2 ~]# chkconfig netfs on
[root@av2 ~]# /etc/init.d/portmap start


[root@av2 ~]# showmount -e
Export list for av2:
/opt/Xilinx 192.168.0.1/24,av2


disabled (iptables & the firewall) -- [or at least i think....its diasabled]


[root@av2 ~]# service iptables save
[root@av2 ~]# service iptables stop
[root@av2 ~]# chkconfig iptables off
[root@av2 ~]# service ip6tables save
[root@av2 ~]# service ip6tables stop
[root@av2 ~]# chkconfig ip6tables off


ON CLIENT (CENTOS):
/etc/fstab

av2:/opt/Xilinx /opt/Xilinx nfs defaults,vers=3,rsize=8192,wsize=8192,timeo=14,intr,rw


[root@pipe /UTILITIES]# ssh av2
ssh: connect to host av2 port 22: Connection refused

[root@pipe /UTILITIES]# mount /opt/Xilinx
mount: mount to NFS server 'av2' failed: System Error: Connection refused.

--------------------------------------

however if i use the RHEL box as a client it works fine, but cand seem to get the exported NFS working...

One box AV2 is RHEL 5, the other PIPE is CentOS 5.6...

From the client - CentOS box if i do... "showmount -e av2"

[root@pipe ~]# showmount -e av2
mount clntudp_create: RPC: Port mapper failure - RPC: Unable to receive

Thoughts?
 
Old 08-08-2011, 03:13 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

If you are allowing all then what is the use of putting the following entries in hosts.allow:

/etc/hosts.allow:
all : all
all :all@all

Remove these entries from the hosts.allow to avoid any confusion. Do you have any entries setup in /etc/hosts.deny? If yes, then remove them as well.

192.168.0.1/24(rw,sync,no_root_squash)

The above line is not required in your /etc/exports. Anyways which IP is this? Is this the IP of your RHEL server or CentOS server?

From the CentOS system did you try to telnet your RHEL server on port 22 and port 2049?

You also get connection refused if the service is down. I hope you have checked the service nfs status after starting up the service to check they are indeed running.

What is the output of the following command:

1. exportfs

Run the following commands and then give it a try:

1. service nfs stop
2. service portmap stop
3. service iptables stop
4. service iptables6 stop
5. service network restart (just to make sure your system's NIC is properly up and running, you can avoid this command though not really required)
6. service portmap start
7. service nfs start
8. iptables -F
9. exportfs

Once the above commands are executed give a try to connect to nfs share.
 
Old 08-08-2011, 03:52 PM   #3
drsgrid
LQ Newbie
 
Registered: Aug 2011
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
Hi there,

If you are allowing all then what is the use of putting the following entries in hosts.allow:

/etc/hosts.allow:
all : all
all :all@all
removed...

Quote:
Originally Posted by T3RM1NVT0R View Post

192.168.0.1/24(rw,sync,no_root_squash)

The above line is not required in your /etc/exports. Anyways which IP is this? Is this the IP of your RHEL server or CentOS server?
192.168.0.1 is the client "pipe" (CentOS 5.6)
192.168.0.106 is the server "av2" (RHEL 5)

Quote:
Originally Posted by T3RM1NVT0R View Post
From the CentOS system did you try to telnet your RHEL server on port 22 and port 2049?

You also get connection refused if the service is down. I hope you have checked the service nfs status after starting up the service to check they are indeed running.
Oh $h@!# ....

root@pipe /etc/sysconfig]# telnet av2
Trying XX.XX.XXX.XX...
telnet: connect to address XX.XX.XXX.XX: Connection refused
telnet: Unable to connect to remote host: Connection refused

AGG !!! shows wrong ip address for av2!
in /etc/hosts file on client, which has way too many entries - apparently host "av2" was listed twice due to typo
and it was grabbing wrong ip address !

fixed host file... problem resolved...

Thanks though... but how embarrassing is that...
 
Old 08-08-2011, 03:55 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Nothing to get embarrassed, that is how we learn.

Am glad that you got it sorted. Could you please mark the thread as solved.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Fedora 10/unable to ssh out from box to remote host (SSH within LAN ok) huskeypm Linux - Networking 3 04-14-2009 07:37 PM
WinXp: Mounting a Z: drive from a distant NFS&/OrSamba Linux server via using SSH frenchn00b Linux - Server 4 01-01-2008 08:05 AM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM
Can't ssh into my box from work. donk3 Linux - Security 3 08-27-2003 07:54 AM
Diffrence nfs & telnet,ssh etc... tkmuthuvel Linux - Networking 2 08-03-2003 09:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 04:08 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