Hi everyone,
I've spent the better part of the day playing and googling, but have run out
of ideas. Hopefully someone here can point me in the right direction! I
have two Linux boxes in different buildings. I would like to access a
directory on one box (sby-server) from the other (nby-server) over Internet.
There is a firewall up on both boxes, so I'm trying to do this using SSH.
I'm using Fedora Core 3 on sby-server and Fedora Core 2 on nby-server. I've
read through an NFS Howto and learned how to lock down the ports that NFS
uses, as I believe they were assigned "randomly". On sby-server, this is
what "rpcinfo -p" reports:
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 32768 status
100024 1 tcp 32768 status
100011 1 udp 4003 rquotad
100011 2 udp 4003 rquotad
100011 1 tcp 4003 rquotad
100011 2 tcp 4003 rquotad
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 udp 32899 nlockmgr
100021 3 udp 32899 nlockmgr
100021 4 udp 32899 nlockmgr
100021 1 tcp 33024 nlockmgr
100021 3 tcp 33024 nlockmgr
100021 4 tcp 33024 nlockmgr
100005 1 udp 4002 mountd
100005 1 tcp 4002 mountd
100005 2 udp 4002 mountd
100005 2 tcp 4002 mountd
100005 3 udp 4002 mountd
100005 3 tcp 4002 mountd
So NFS is always on port 2049, and MOUNTD on 4002. On nby-server, I run
these two commands to establish connections and forward the ports:
ssh root@sby-server -L 250:localhost:2049 -f sleep 60
ssh root@sby-server -L 251:localhost:4002 -f sleep 60
My nby-server /etc/fstab has the following entry:
localhost:/usr/local/share /mnt/share nfs
rw,hard,intr,port=250,mountport=251 0 0
My sby-server /etc/exports has the following entry:
/usr/local/share 127.0.0.1(rw)
But, running "mount -v /mnt/share" gives me this:
mount to NFS server 'localhost' failed: possible invalid port.
RPC Error: 15 ( Program not registered )
After some googling I read that people suggested adding some entries in
/etc/host.allow, which I did on nby-server:
ALL: 127.0.0.1
ALL: 192.168.3. #This is the network nby-server is attached to, don't
know if I need it...
portmap: sby-server
And "sby-server" is properly set in my /etc/hosts file. Any ideas on where
I should go next? The end goal is, once I have the NFS share mounted
properly on nby-server, that I can use Samba to make it available to my
Windows workstations so users can read/write to that share.
Thanks in advance. :-)
Michael.
|