配置nfs服务器时,服务器端挂载没有问题,但是客户端挂载时提示:mount.nfs: Connection timed out
解决方法1:
关闭firewalld
# systemctl stop firewalld
# firewall-cmd --state
not running
解决方法2:
rpcinfo -p
显示如下:
program vers proto port service 100000 4 tcp 111 portmapper 100000 3 tcp 111 portmapper 100000 2 tcp 111 portmapper 100000 4 udp 111 portmapper 100000 3 udp 111 portmapper 100000 2 udp 111 portmapper 100024 1 udp 60985 status 100024 1 tcp 54302 status 100005 1 udp 20048 mountd 100005 1 tcp 20048 mountd 100005 2 udp 20048 mountd 100005 2 tcp 20048 mountd 100005 3 udp 20048 mountd 100005 3 tcp 20048 mountd 100003 3 tcp 2049 nfs 100003 4 tcp 2049 nfs 100227 3 tcp 2049 nfs_acl 100003 3 udp 2049 nfs 100003 4 udp 2049 nfs 100227 3 udp 2049 nfs_acl 100021 1 udp 46666 nlockmgr 100021 3 udp 46666 nlockmgr 100021 4 udp 46666 nlockmgr 100021 1 tcp 42955 nlockmgr 100021 3 tcp 42955 nlockmgr 100021 4 tcp 42955 nlockmgr 100011 1 udp 875 rquotad 100011 2 udp 875 rquotad 100011 1 tcp 875 rquotad 100011 2 tcp 875 rquotad
开放这些端口:
firewall-cmd --permanent --add-port=111/tcp
firewall-cmd --permanent --add-port=54302/tcp
firewall-cmd --permanent --add-port=20048/tcp
firewall-cmd --permanent --add-port=2049/tcp
firewall-cmd --permanent --add-port=46666/tcp
firewall-cmd --permanent --add-port=42955/tcp
firewall-cmd --permanent --add-port=875/tcp
然后
firewall-cmd --reload
(责任编辑:IT) |