( Solved )How do I set this up

Danbor

Active Member
Joined
Aug 1, 2023
Messages
105
Reaction score
44
Credits
1,108
Hello all. Looking for advice on how to configure my home network. Research has shown me that there are many ways to set up a network. Lots of advice here and while I've tried a lot of things I read about here and other places, I've had limited success in achieving what I need. Bear with me as I explain what I have and how I'd like it set up.
I have two desktop and one laptop computers and one all in one printer. There is an ISP supplied box. Frankly, I don't know what the thing is called, a modem or a router. The cable comes into the house and connects to it and it provides the wifi signals for the computers and the printer as well as internet access. I have Mint Victoria on all three computers and all three have Nord VPN installed. SSH and Samba are installed on all three already.
I am the only person on this network. On all three, the password and username are the same. Now for what I'd like the set up to be. Sounds like it should be easy but I'm having a hard time getting it set up. I want to have access to the printer, all folders and files on all the computers from all the computers. I don't mind having to sudo to access root, but I'd like to see those files, if that makes sense.
Is this in any way possible?
 


You are mixing a few different things here. I have questions.

Are all these computers Linux?
Are some of them Windows?
Are you connected via ethernet cables to your router/switch?
Are you connected via Wifi?
Are some on ethernet, and some on Wifi?
Do you know the root password on all of these computers?
Can all of these computers currently access the internet?
Do you know how to find the IP address of all of these devices?

You don't need Nord VPN to do what you have listed as requirements here.
You only need Samba, if you want to share between Linux and Windows.
If all of these computers are already on the network, and they can see each other ( ping )
Then this shouldn't be too bad.
 
Yes, all computers are Mint Victoria.
No, nothing microsoft anywhere.
No ethernet cables.
All computers and the printer are connected by wifi.
The root password and login password, as well as usernames are the same on all computers
All computers can connect to the internet, as well as each other.
I have the IP address of all 4 machines.
The VPN isn't installed for the home network, it's for everything outside the home network. All four machines are whitelisted in the Nord VPN configuration settings on each computer.
I'm not having connection issues per se. More communication issues. Getting the machines to permit a connection with each other. Then, get them to allow access to the file systems. All the files on all the computers, not just a share folder, but the whole file tree.
 
Going to mark this as solved! ( as soon as I figure out how :D )
And it was almost too easy. I found a thread on another forum where someone said it could be done using the sftp command. No additional software needed as it uses ssh which was installed with the OS. Literally done in minutes.
 
Well, then this just got a lot easier.

sudo apt install nfs-kernel-server

You need to do that of every computer that you want to share files from. In your case, probably all 3.

sudo apt install nfs-common

You need to do this on every computer that you want to share files to. In your case, probably all 3.

Then you need to edit this file.

sudo nano /etc/exports

Add a line that looks similar to this on the computer doing the sharing.

/path/to/shared 192.168.1.100(rw) 192.168.1.101(rw)

Where the path is the filesystem you want to share. Sharing from / is highly advised against.
It's very easy to delete necessary system files if you do this, so sharing under /bin, /etc, and /var
is highly discouraged. Usually /home or something like /share are good.

The IP address, is the IP address of the client.

The (rw) are the permissions they have to the share. ( read, write )

The on the computer doing the sharing ( the NFS server ), you need to run this command.

sudo systemctl restart nfs-kernel-server

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

Now on the other 2 computers, ( the clients ) you need to do this...

sudo mkdir -p /mnt/computer1
sudo mkdir -p /mnt/computer2


You can name this anything you want, as long as it doesn't conflict with an already existing directory.
If you're going to do for all three computers, you'll need two directories, per computer.

To make things easier to keep track of, you can them whatever the computer name is.
On computer1, the mount points would be something like computer2 and computer3
On computer2, the mount points would be something like computer1 and computer3
On computer 3, it would be computer1 and computer2.

Hopefully that makes sense.

Next, you need to mount the file shares.

sudo mount 192.168.1.88:/path/to/share /mnt/computer1
sudo mount 192.168.1.88:/path/to/share /mnt/computer2


Again, you'll need to round robin the names to match the mount points on each computer.
(i.e. 1 and 2, 2 and 3, 1 and 3 )

So this will work, but you'll manually have to remount them every time you reboot.
How do we make this persistent?

Add the following lines to your /etc/fstab file, just add these lines at the bottom.
On computer1 it would look like this. ( where computerX_ip is the actual IP address )

computer3_ip:/path/to/share /mnt/computer1 nfs defaults 0 0
computer3_ip:/path/to/share /mnt/computer2 nfs defaults 0 0
computer2_ip:/path/to/share /mnt/computer1 nfs defaults 0 0
computer2_ip:/path/to/share /mnt/computer3 nfs defaults 0 0

You'll have to repeat this on all three computers, each one would be slightly different.
 
Last edited:
You may have to allow certain ports through your fire-wall.
I don't use Mint, so I'm doing a little guessing on this part, someone else may have to step in and correct me.
It's possible Mint doesn't even have a firewall installed by default.

I use firewall-cmd, which is different from Ubuntu/Mint ufw, but I'll try to give this a shot.

sudo ufw allow from <client_ip> to any port 111,2049 proto tcp
sudo ufw allow from <client_ip> to any port 111,2049 proto udp

Then reload it.
sudo ufw reload

Hopefully that will open the ports for you.
 

Members online


Top