<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tmrlvi</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tmrlvi"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Tmrlvi"/>
	<updated>2026-04-27T04:03:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Setting_up_an_NFS_server&amp;diff=26891</id>
		<title>Setting up an NFS server</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Setting_up_an_NFS_server&amp;diff=26891"/>
		<updated>2024-07-05T20:48:49Z</updated>

		<summary type="html">&lt;p&gt;Tmrlvi: idmapd is replaced by nfsidmap&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installation =&lt;br /&gt;
Install package:&lt;br /&gt;
{{Cmd|apk add nfs-utils}}&lt;br /&gt;
&lt;br /&gt;
= Make it autostart =&lt;br /&gt;
Export dirs in /etc/exports, then &lt;br /&gt;
{{Cmd|rc-update add nfs}}&lt;br /&gt;
&lt;br /&gt;
If you need just to mount nfs share from fstab file at booting of the system&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add nfsmount}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
{{Cmd|rc-update add netmount}}&lt;br /&gt;
&lt;br /&gt;
You can check your boot services:&lt;br /&gt;
{{Cmd|rc-status}}&lt;br /&gt;
&lt;br /&gt;
= Start it up now =&lt;br /&gt;
{{Cmd|rc-service nfs start}}&lt;br /&gt;
&lt;br /&gt;
or if you need to mount nfs share from fstab file now&lt;br /&gt;
{{Cmd|rc-service nfsmount start}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-service netmount start}}&lt;br /&gt;
&lt;br /&gt;
= Adding Kerberos Authentication =&lt;br /&gt;
&lt;br /&gt;
By default, NFS security only validates the IP of the client. You can add user level authentication with a Kerberos installation ([https://pkgs.alpinelinux.org/package/edge/main/armhf/krb5 MIT KRB5] or [https://pkgs.alpinelinux.org/package/edge/main/x86/heimdal Heimdal]). It is recommended to have the same Kerberos flavor across the network as both implementations are not completely mutually compatible.&lt;br /&gt;
&lt;br /&gt;
== Server Configuration ==&lt;br /&gt;
&lt;br /&gt;
Assuming you setup Kerberos in the in the network, create ticket to your NFS machine (examples are in MIT KRB5 syntax):&lt;br /&gt;
&lt;br /&gt;
{{Cmd| kadmin: addprinc -randkey nfs/nfs1.example.com@EXAMPLE.COM}}&lt;br /&gt;
&lt;br /&gt;
And add it to the machines krb5.keytab file:&lt;br /&gt;
{{Cmd| kadmin: ktadd nfs/nfs1.example.com@EXAMPLE.COM}}&lt;br /&gt;
&lt;br /&gt;
Then, edit your /etc/exports, and add sec=krb5 (only authentication), sec=krb5i (also hmac signing) or sec=krb5p (also encryption). For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/data      10.10.10.0/24(rw,nohide,no_subtree_check,sec=krb5p,no_root_squash)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After editing /etc/exports, reload your setting&lt;br /&gt;
{{Cmd|exports -afv}}&lt;br /&gt;
&lt;br /&gt;
User id mapping is managed by nfsidmap.&lt;br /&gt;
&lt;br /&gt;
== Client Configuration ==&lt;br /&gt;
&lt;br /&gt;
In order for the client to connect to NFS via kerberos, enable and start rpc.gssd.&lt;br /&gt;
{{Cmd|rc-update add rpc.gssd&lt;br /&gt;
rc-service rpc.gssd start}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Server]]&lt;/div&gt;</summary>
		<author><name>Tmrlvi</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Setting_up_an_NFS_server&amp;diff=26890</id>
		<title>Setting up an NFS server</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Setting_up_an_NFS_server&amp;diff=26890"/>
		<updated>2024-07-05T19:16:13Z</updated>

		<summary type="html">&lt;p&gt;Tmrlvi: Added export information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installation =&lt;br /&gt;
Install package:&lt;br /&gt;
{{Cmd|apk add nfs-utils}}&lt;br /&gt;
&lt;br /&gt;
= Make it autostart =&lt;br /&gt;
Export dirs in /etc/exports, then &lt;br /&gt;
{{Cmd|rc-update add nfs}}&lt;br /&gt;
&lt;br /&gt;
If you need just to mount nfs share from fstab file at booting of the system&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add nfsmount}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
{{Cmd|rc-update add netmount}}&lt;br /&gt;
&lt;br /&gt;
You can check your boot services:&lt;br /&gt;
{{Cmd|rc-status}}&lt;br /&gt;
&lt;br /&gt;
= Start it up now =&lt;br /&gt;
{{Cmd|rc-service nfs start}}&lt;br /&gt;
&lt;br /&gt;
or if you need to mount nfs share from fstab file now&lt;br /&gt;
{{Cmd|rc-service nfsmount start}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-service netmount start}}&lt;br /&gt;
&lt;br /&gt;
= Adding Kerberos Authentication =&lt;br /&gt;
&lt;br /&gt;
By default, NFS security only validates the IP of the client. You can add user level authentication with a Kerberos installation ([https://pkgs.alpinelinux.org/package/edge/main/armhf/krb5 MIT KRB5] or [https://pkgs.alpinelinux.org/package/edge/main/x86/heimdal Heimdal]). It is recommended to have the same Kerberos flavor across the network as both implementations are not completely mutually compatible.&lt;br /&gt;
&lt;br /&gt;
== Server Configuration ==&lt;br /&gt;
&lt;br /&gt;
Assuming you setup Kerberos in the in the network, create ticket to your NFS machine (examples are in MIT KRB5 syntax):&lt;br /&gt;
&lt;br /&gt;
{{Cmd| kadmin: addprinc -randkey nfs/nfs1.example.com@EXAMPLE.COM}}&lt;br /&gt;
&lt;br /&gt;
And add it to the machines krb5.keytab file:&lt;br /&gt;
{{Cmd| kadmin: ktadd nfs/nfs1.example.com@EXAMPLE.COM}}&lt;br /&gt;
&lt;br /&gt;
Then, edit your /etc/exports, and add sec=krb5 (only authentication), sec=krb5i (also hmac signing) or sec=krb5p (also encryption). For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/data      10.10.10.0/24(rw,nohide,no_subtree_check,sec=krb5p,no_root_squash)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After editing /etc/exports, reload your setting&lt;br /&gt;
{{Cmd|exports -afv}}&lt;br /&gt;
&lt;br /&gt;
If you want to use Kerberos for the user permission on the filesystem, you should enable id mapping available in NFSv4 by editing the following line in /etc/conf.d/nfs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NFS_NEEDED_SERVICES=&amp;quot;rpc.idmapd&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default, the domain user will be mapped directly to an existing local user (or nobody). To change this behavior, edit /etc/idmapd.conf and restart rpc.idmapd. Note that by default the realm it considers is the domain from the hostname, and the user is the username under that realm.&lt;br /&gt;
&lt;br /&gt;
== Client Configuration ==&lt;br /&gt;
&lt;br /&gt;
In order for the client to connect to NFS via kerberos, enable and start rpc.gssd.&lt;br /&gt;
{{Cmd|rc-update add rpc.gssd&lt;br /&gt;
rc-service rpc.gssd start}}&lt;br /&gt;
&lt;br /&gt;
And for correct id mapping (when using NFSv4), enable and start the rpc.idmapd&lt;br /&gt;
{{Cmd|rc-update add rpc.idmapd&lt;br /&gt;
rc-service rpc.idmapd start}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Server]]&lt;/div&gt;</summary>
		<author><name>Tmrlvi</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:Setting_up_an_NFS_server&amp;diff=26889</id>
		<title>Talk:Setting up an NFS server</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:Setting_up_an_NFS_server&amp;diff=26889"/>
		<updated>2024-07-05T19:12:27Z</updated>

		<summary type="html">&lt;p&gt;Tmrlvi: Created page with &amp;quot;= NFSClient service =  The [https://pkgs.alpinelinux.org/contents?branch=edge&amp;amp;name=nfs-utils-openrc&amp;amp;arch=aarch64&amp;amp;repo=main pacakge] that includes rpc.idmapd and rpc.gssd also contains a metaservice nfsclient. It starts rpc.idmapd but not rpc.gssd.   I wonder if we should advice people to use this instead of starting rpc.idmapd directly. On the other hand, it does not seem to be mandatory for nfsmounts (I was able to mount without it).&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= NFSClient service =&lt;br /&gt;
&lt;br /&gt;
The [https://pkgs.alpinelinux.org/contents?branch=edge&amp;amp;name=nfs-utils-openrc&amp;amp;arch=aarch64&amp;amp;repo=main pacakge] that includes rpc.idmapd and rpc.gssd also contains a metaservice nfsclient. It starts rpc.idmapd but not rpc.gssd. &lt;br /&gt;
&lt;br /&gt;
I wonder if we should advice people to use this instead of starting rpc.idmapd directly. On the other hand, it does not seem to be mandatory for nfsmounts (I was able to mount without it).&lt;/div&gt;</summary>
		<author><name>Tmrlvi</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Setting_up_an_NFS_server&amp;diff=26888</id>
		<title>Setting up an NFS server</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Setting_up_an_NFS_server&amp;diff=26888"/>
		<updated>2024-07-05T19:05:38Z</updated>

		<summary type="html">&lt;p&gt;Tmrlvi: Added basic configuration for kerberos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Installation =&lt;br /&gt;
Install package:&lt;br /&gt;
{{Cmd|apk add nfs-utils}}&lt;br /&gt;
&lt;br /&gt;
= Make it autostart =&lt;br /&gt;
Export dirs in /etc/exports, then &lt;br /&gt;
{{Cmd|rc-update add nfs}}&lt;br /&gt;
&lt;br /&gt;
If you need just to mount nfs share from fstab file at booting of the system&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-update add nfsmount}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
{{Cmd|rc-update add netmount}}&lt;br /&gt;
&lt;br /&gt;
You can check your boot services:&lt;br /&gt;
{{Cmd|rc-status}}&lt;br /&gt;
&lt;br /&gt;
= Start it up now =&lt;br /&gt;
{{Cmd|rc-service nfs start}}&lt;br /&gt;
&lt;br /&gt;
or if you need to mount nfs share from fstab file now&lt;br /&gt;
{{Cmd|rc-service nfsmount start}}&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
{{Cmd|rc-service netmount start}}&lt;br /&gt;
&lt;br /&gt;
= Adding Kerberos Authentication =&lt;br /&gt;
&lt;br /&gt;
By default, NFS security only validates the IP of the client. You can add user level authentication with a Kerberos installation ([https://pkgs.alpinelinux.org/package/edge/main/armhf/krb5 MIT KRB5] or [https://pkgs.alpinelinux.org/package/edge/main/x86/heimdal Heimdal]). It is recommended to have the same Kerberos flavor across the network as both implementations are not completely mutually compatible.&lt;br /&gt;
&lt;br /&gt;
== Server Configuration ==&lt;br /&gt;
&lt;br /&gt;
Assuming you setup Kerberos in the in the network, create ticket to your NFS machine (examples are in MIT KRB5 syntax):&lt;br /&gt;
&lt;br /&gt;
{{Cmd| kadmin: addprinc -randkey nfs/nfs1.example.com@EXAMPLE.COM}}&lt;br /&gt;
&lt;br /&gt;
And add it to the machines krb5.keytab file:&lt;br /&gt;
{{Cmd| kadmin: ktadd nfs/nfs1.example.com@EXAMPLE.COM}}&lt;br /&gt;
&lt;br /&gt;
If you want to use Kerberos for the user permission on the filesystem, you should enable id mapping available in NFSv4 by editing the following line in /etc/conf.d/nfs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NFS_NEEDED_SERVICES=&amp;quot;rpc.idmapd&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By default, the domain user will be mapped directly to an existing local user (or nobody). To change this behavior, edit /etc/idmapd.conf and restart rpc.idmapd. Note that by default the realm it considers is the domain from the hostname, and the user is the username under that realm.&lt;br /&gt;
&lt;br /&gt;
== Client Configuration ==&lt;br /&gt;
&lt;br /&gt;
In order for the client to connect to NFS via kerberos, enable and start rpc.gssd.&lt;br /&gt;
{{Cmd|rc-update add rpc.gssd&lt;br /&gt;
rc-service rpc.gssd start}}&lt;br /&gt;
&lt;br /&gt;
And for correct id mapping (when using NFSv4), enable and start the rpc.idmapd&lt;br /&gt;
{{Cmd|rc-update add rpc.idmapd&lt;br /&gt;
rc-service rpc.idmapd start}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Server]]&lt;/div&gt;</summary>
		<author><name>Tmrlvi</name></author>
	</entry>
</feed>