Skip to content

Instantly share code, notes, and snippets.

@strayge
Last active May 5, 2020 16:39
Show Gist options
  • Save strayge/0b95646b2798db972f9f34edcb494c44 to your computer and use it in GitHub Desktop.
Save strayge/0b95646b2798db972f9f34edcb494c44 to your computer and use it in GitHub Desktop.
config NFS on Ubuntu
#### server ####
# apt update
# apt install nfs-kernel-server
# snap install --classic micro
# ufw allow from <CLIENT_IP> to any port nfs
# ufw allow from any to any port ssh
# ufw enable
mkdir /tmp/share
chown nobody:nogroup /tmp/share
micro /etc/exports
> /tmp/share <CLIENT_IP>(rw,sync,no_subtree_check,fsid=0,no_acl,no_root_squash,insecure,all_squash,anonuid=0,anongid=0)
systemctl restart nfs-kernel-server
# showmount -e
#### client ####
apt install nfs-common
mount -t nfs4 <SERVER_IP>:/ /root/backups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment