Thanks Anders Yes I can ping each machine. I would just like to be able to access my home directory on one machine from the other - mainly for backing up and file-sharing purposes. I'm afraid I don't know what services to configure and whether I need to edit certain files, such as /etc/hosts Do I need to set up specific host names and a domain, for example. What do I put in /etc/hosts if the IP address changes at each connection? I've tried configuring lisa in the KDE control centre but I'm not making too much progress. Sorry if this is basic stuff - your help is appreciated. avid
On Tuesday 25 June 2002 20.16, David Robertson wrote:
I would just like to be able to access my home directory on one machine from the other - mainly for backing up and file-sharing purposes. I'm afraid I don't know what services to configure and whether I need to edit certain files, such as /etc/hosts
Not by default you shouldn't have to. There are two major ways of sharing directories: nfs and samba. nfs is easiest to set up, samba can be used with windows computers too. With nfs, make sure you have the package nfs-utils installed, edit the file /etc/exports and insert a line like /home 192.168.7.0/24(rw,no_root_squash) save, then run "rcportmap start" and "rcnfsserver start". On the other machine, run "rcportmap start", then create a directory somewhere, say /mnt/home for instance, then run mount -t nfs ip.of.the.other.machine:/home /mnt/home That will give you access to the exported home directory under /mnt/home. //Anders -- `When I use a word,' Humpty Dumpty said in rather a scornful tone, `it means just what I choose it to mean -- neither more nor less.'
On Tuesday 25 June 2002 01:05 pm, Anders Johansson wrote:
On Tuesday 25 June 2002 20.16, David Robertson wrote:
I would just like to be able to access my home directory on one machine from the other - mainly for backing up and file-sharing purposes. I'm afraid I don't know what services to configure and whether I need to edit certain files, such as /etc/hosts
Not by default you shouldn't have to.
There are two major ways of sharing directories: nfs and samba. nfs is easiest to set up, samba can be used with windows computers too.
With nfs, make sure you have the package nfs-utils installed, edit the file /etc/exports and insert a line like
/home 192.168.7.0/24(rw,no_root_squash)
save, then run "rcportmap start" and "rcnfsserver start".
On the other machine, run "rcportmap start", then create a directory somewhere, say /mnt/home for instance, then run
mount -t nfs ip.of.the.other.machine:/home /mnt/home
That will give you access to the exported home directory under /mnt/home.
I doubt that this is what he really wants to do, however... If you configure it like this, it *will* work, at least for a little while. However, as soon as his ISP gives him back a DHCP lease with a different address, the connection will be broken. The other problem with this setup is that you're really openning yourself up to the outside world. Having an NFS server exposed to the world is certainly a security risk. Kinda like painting a target on your back. What I'd *really* recommend is having 2 NICs in one (or, I suppose, both) of the computers. One of these would be connnected to the public internet, the other on your private LAN. Configure your gateway machine (the box with 2 NICs) to use NAT, and setup your internal network to use the private 192.168.1.0 network address. You can errect a firewall on the public interface, then, which can then block NFS, etc. With this type of arrangement, you're *much* more secure. It also simplfies things in that you only need to "nail down" one machine. The other possibility that comes to mind is to use a dummy "virtual" interface on both of the machines. Allow eth0 to be configured via DHCP, and firewall the hell out of it. Then, build a virtual network on top of the existing one: host1# ficonfig eth0:1 192.168.1.2 host2# ifconfig eth0:1 192.168.1.3 With the proper firewalling rules, I think that these virtual hosts should be able to talk to each other pretty securely without too much risk. Packets should never be routed to them from the outside world because they both have private IPs, yet your hub should move the packets between the two. Has anybody ever tried anything like this? I've long wondered how well it would work. -Nick
On Wednesday 26 June 2002 01.02, Nick LeRoy wrote:
I doubt that this is what he really wants to do, however...
If you configure it like this, it *will* work, at least for a little while. However, as soon as his ISP gives him back a DHCP lease with a different address, the connection will be broken.
erm, no I don't think so. the 192.168.7.* addresses I'd be willing to bet a substantial amount of money are private to his lan. They are distributed by the dsl router, not his isp. The dsl router gets an ip from his ISP, but that's not important (or even relevant) here.
The other problem with this setup is that you're really openning yourself up to the outside world. Having an NFS server exposed to the world is certainly a security risk. Kinda like painting a target on your back.
If the dsl router does reverse natting then that would be a concern, yes.
What I'd *really* recommend is having 2 NICs in one (or, I suppose, both) of the computers.
OK, you didn't read the first message in the thread, did you?
Has anybody ever tried anything like this? I've long wondered how well it would work.
I'm running it now. What would you like to know? //Anders -- `When I use a word,' Humpty Dumpty said in rather a scornful tone, `it means just what I choose it to mean -- neither more nor less.'
participants (3)
-
Anders Johansson
-
David Robertson
-
Nick LeRoy