【NFS&firewalld】How to correct firewalld in Centos7 to allow NFS access?

一、安装nfs server

# yun -y install nfs-utils rpcbind


二 、设置nfs相关服务的开机自启

# systemctl enable rpcbind

# systemctl enable nfs-server

# systemctl enable nfs-lock

# stemctl enable nfs-idmap


三、启动nfs服务

# systemctl start rpcbind

# systemctl start nfs-server

# systemctl start nfs-lock

# systemctl start nfs-idmap


四、启动firewalld

# systemctl start firewalld

# systemctl enable firewalld


五、添加防火墙规则

# firewall-cmd --permanent --add-service=nfs

# firewall-cmd --permanent --add-service=mountd

# firewall-cmd --permanent --add-service=rpc-bind

# firewall-cmd --reload


六、参考

CentOS 7 NFS服务器和客户端设置

http://blog.ilc.edu.tw/blog/index.php?op=printView&articleId=682711&blogId=25793 

Red Hat Enterprise Linux7/Storage Administration/Network File System (NFS)

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/ch-nfs#s2-nfs-how-daemons 

CentOS 7 下使用 Firewall

https://havee.me/linux/2015-01/using-firewalls-on-centos-7.html 

Control Network Traffic with iptables

https://www.linode.com/docs/security/firewalls/control-network-traffic-with-iptables 

CentOS 上的 FirewallD 简明指南

https://linux.cn/article-8098-1.html 

如何设置防火墙在CentOS 7使用FirewallD

https://www.howtoing.com/how-to-set-up-a-firewall-using-firewalld-on-centos-7 

https://unix.stackexchange.com/questions/243756/nfs-servers-and-firewalld

你可能感兴趣的:(【NFS&firewalld】How to correct firewalld in Centos7 to allow NFS access?)