-   Linux - Networking (
-   -   Laptop to Desktop: file sharing nightmare (

PhoenixAndThor 03-18-2010 05:16 PM

Laptop to Desktop: file sharing nightmare
One of the many things that annoys me about college is that they only each you the Windows way to do stuff. This may be a simple problem for many people, but for me, it's turned into a nightmare. First, my current setup:

Have a cable modem from my ISP connected to a wireless router.

Messed with DNS and reserved addresses for main desktop and a netbook, so now both computers will always get the same IP address, but I still have the option of letting friends connect to my network. Router has NAT and stateful firewall built in.

Wireless router secured with WPA2.

Main desktop was assembled from a barebones kit, running Xubuntu 9.10 (kicked SUSE to the curb, too bloated) firewall(fireHOL) fresh installed but not really configured (have not edited config file). This computer is connected directly with a CAT 5 cable.

Netbook is a Lenovo IdeaPad S10 now running Arch (yep, killed XP). Netbook also has FireHOL installed. This netbook is connected wirelessly (802.11g).

Right now, I can get both systems to ping each others IPs successfully, but not their hostnames (DNS, NIS setup?).

Problem: I want to set up the desktop to host a shared directory to sync files with the netbook. I would like this set up in such a way that:
1. The netbook has RW permissions to the shared folder
2. Only the netbook can connect to it.
3. FireHOL (installed on both systems) would still be able to protect both system if the firewall on the router was somehow compromised.
4. The shared folder will not accessible outside of the network (no SSH, VPN etc.)

On Windows, this is mostly a point and click procedure, but they never taught us how to set this up with pure *Nix systems. I have been at this for almost a week. I have messed with NFS, ufw, FTP, point to point, etc. and still can't get this set up the way I want. Thanks in advance.

rweaver 03-18-2010 05:20 PM

If you can't ping their hostnames then likely you're running into an issue with name resolution. A simple solution since it is only two machines is to put a host entry in each of the machines for the other.

I would suggest since you're using linux->linux that you use nfs. It's pretty easy to setup. We can help you with any problems you run into but we need to know what they are and at this point we have idea just that you haven't been able to get it to work. Post the configs you're using and how its failing and the messages you're getting when it does.

PhoenixAndThor 03-18-2010 07:03 PM

Sorry about that, got knocked offline for while. I thought about what you said and started messing with the hosts file on both computers, then the hosts.allow files. Now both computers can ping each other by name, but I still can't get them to share files. Here's what the hosts.allow file looks like on the Xubuntu desktop (hosting the shared folder):
lockd: netbook: allow
rquoted: netbook: allow
mountd: netbook: allow
statd: netbook: allow

"netbook" is netbook (hid the real hostname here for security). Now here's what the exports file looks like

/media/NB-Share mini-me(rw,async,all_squash)

The command that I try to use to mount the folder on Arch:

mount desktop:/media/NB-Share /var/NB-Share

With the above command, it seems to freeze and eventually spits out:

mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified

I tried the same command again as root (no sudo) and got the same result. The stall time here is about a minute.

rweaver 03-19-2010 10:39 AM

Is statd running on the local machine? Have you ensured that all the necessary daemons are running on the remote also?

PhoenixAndThor 03-19-2010 12:14 PM

Sorry for not posting back sooner. I actually fixed it by disabling firehol on both machines. You see, Xubuntu comes with a GUI for the sharing thing, but when that failed, I started running all over the place editing config files. For some reason, firehol settings are not taking on Arch, and they are forgotten with each reboot on Xubuntu.

So, yes, they can now share files, but they would be unprotected if my router was cracked. So now it comes down to finding a proper iptables/netfilter front end available on both distros that can be used with NFS. Why they don't cover this sort of thing in college, I'll never know. For quite a while, the only kind of firewalls I've ever had to set up were for keeping people out. Now I have to set one up let my netbook, and only my netbook, have access to the goodies on my desktop.

All times are GMT -5. The time now is 04:36 PM.