Enable NFS server
systemctl enable nfs-lock.service
systemctl enable nfs-server.service
systemctl start nfs-lock.service
systemctl start nfs-server.service
cat >/etc/firewalld/services/mountd.xml <<EOD
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>mountd</short>
<description>Mount Lock Daemon</description>
<port protocol="tcp" port="20048"/>
<port protocol="udp" port="20048"/>
</service>
EOD
cat >/etc/firewalld/services/rpc-bind.xml <<EOD
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>rpc-bind</short>
<description>Remote Procedure Call Bind</description>
<port protocol="tcp" port="111"/>
<port protocol="udp" port="111"/>
</service>
EOD
restorecon /etc/firewalld/services
firewall-cmd --permanent --zone public --add-service mountd
firewall-cmd --permanent --zone public --add-service rpc-bind
firewall-cmd --permanent --zone public --add-service nfs
firewall-cmd --reload
firewall-cmd --list-all
Recent Comments