-
sudo mkdir -p /export/users
-
mkdir /nfshome
-
sudo apt-get install nfs-kernel-server
-
/etc/exports
:
/export 192.168.0.0/24(rw,fsid=0,insecure,no_root_squash,no_subtree_check,async) /export/users 192.168.0.0/24(rw,nohide,insecure,no_root_squash,no_subtree_check,async) ````
-
/etc/fstab
:
/nfshome /export/users none bind 0 0 ```
sudo mount -a
sudo service nfs-kernel-server start
-
sudo apt-get install nfs-common
-
mkdir /nfshome
-
/etc/fstab
:
192.168.0.100:/users /nfshome nfs auto 0 0 ```
sudo mount -a
- make sure user's UID and GID is the same an all machines
- move the user's files
sudo mv /home/lamor /nfshome
- change the user's home dir (ON ALL MACHINES):
sudo vim /etc/passwd
:lamor:x:2000:2000:,,,:/nfshome/lamor:/bin/bash
-
create a file
iptables.in
:
*nat
:PREROUTING ACCEPT
:INPUT ACCEPT
:OUTPUT ACCEPT
:POSTROUTING ACCEPT
-A POSTROUTING -o wlan1 -j MASQUERADE
COMMIT
```
2. load with sudo iptables-restore < iptables.in
3. enable IP forwarding on the fly: `sysctl -w net.ipv4.ip_forward=1`
4. make it persistent: edit `/etc/sysctl.conf` and make sure the line `net.ipv4.ip_forward = 1` is in