LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-30-2003, 05:49 PM   #1
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Rep: Reputation: 31
Mounting remote linux directory


I'm trying to mount a directory on another linux machine but I keep getting "connection refused."

This is what I'm doing:

>mount //server1/home/ /mnt/remote

I think this question is so easy that I'm having a hard time finding anything here that talks about it. They are both RH9 machines.

Also, is there a way to mount these system via SSH connection? Thanks again!

Mike
 
Old 12-30-2003, 05:53 PM   #2
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
What type network filesystem are you trying to mount NFS or SAMBA?
If NFS what does the /etc/exports file look like on the server? Is nfsd running on the server.
ps -ef | grep nfs;
If samba what does /etc/samba/smb.conf look like on the server. Is smbd running.
ps -ef | grep smb;
Are there any iptables rules on the server.
iptables -L -n;
 
Old 12-30-2003, 06:05 PM   #3
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
Wow.. I didn't think this would be so detailed, hehe. Thanks for responding. Do you see anything maybe I'm doing wrong? I see that

+++++++++++++++++++++++++++++++
NFS is running:

root 7858 7164 0 17:02 pts/2 00:00:00 grep nfs

+++++++++++++++++++++++++++++++
Here is my /etc/exports

/home johnston(rw) alucard(rw)

+++++++++++++++++++++++++++++++
And here is my IP chains:

Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Lokkit-0-50-INPUT (2 references)
target prot opt source destination
ACCEPT udp -- 132.62.109.6 0.0.0.0/0 udp spt:53 dpts:1025:65535
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 flags:0x16/0x02
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 flags:0x16/0x02
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpts:0:1023 flags:0x16/0x02 reject-with icmp-port-unreachable
REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:2049 flags:0x16/0x02 reject-with icmp-port-unreachable
REJECT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpts:0:1023 reject-with icmp-port-unreachable
REJECT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:2049 reject-with icmp-port-unreachable
REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpts:6000:6009 flags:0x16/0x02 reject-with icmp-port-unreachable
REJECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:7100 flags:0x16/0x02 reject-with icmp-port-unreachable
 
Old 12-30-2003, 06:21 PM   #4
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
You are firewalling port 2049 nfs. You don't want users on the internet to use NFS there are security issues with it so add
iptables -I INPUT -i eth1 -p tcp -dport 2049 -j ACCEPT;
iptables -I INPUT -i eth1 -p udp -dport 2049 -j ACCEPT;
where I assume eth1 is a internal facing nic. If it is already behind firewall then drop the firewall stuff.
iptables -F;

To make the changes perminant
/etc/init.d/iptables save;
ONLY RUN THIS LAST STEP AFTER YOU ARE SURE IT IS WHAT YOU WANT.
That should do it.
 
Old 12-30-2003, 06:32 PM   #5
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
Thank you G-rod! I'm looking into it right now. I have run into one problem trying to add what you suggested.

iptables -I INPUT -i eth1 -p tcp -dport 2049 -j ACCEPT;

Bad argument `2049'

I'm looking through the help right now to see if I can figure out how to fix it. =)
 
Old 12-30-2003, 06:39 PM   #6
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
My bad its --dport not -dport
 
Old 12-30-2003, 06:46 PM   #7
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 419

Original Poster
Rep: Reputation: 31
That didn't work, so I must be doing something else wrong or have something else misconfigured.

[root@server2 mnt]# smbmount //server1/home /mnt/remote
Error connecting to 10.10.10.120 (Connection refused)
7983: Connection to remote failed
SMB connection failed

It's np... I'll just work on it more tomorrow. Thanks so much for your help.
 
Old 12-30-2003, 06:54 PM   #8
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
I thought you were doing it via NFS not Samba.
try
mount -t nfs server1:/home /mnt/home;
make sure the directory /mnt/home exists.
What user are you logged in as?

Last edited by g-rod; 12-30-2003 at 06:59 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting a win2003 directory on linux msound Linux - Networking 3 06-08-2005 01:43 PM
problem mounting a remote folder (on a linux box) haora Linux - Newbie 12 04-22-2005 10:08 AM
Remote (WAN) directory mounting recommendation Mr happy Linux - Networking 0 02-10-2004 05:24 AM
Remote Mounting? (Mount remote folder on local filesystem) mac_phil Linux - Networking 1 11-15-2003 03:48 PM
xftp client does not show remote directory mandrake linux sotpot Linux - Newbie 0 06-08-2003 04:39 PM

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

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