一、介绍 通俗的来说,rpcbind是NFS中 用来进行消息通知的服务。一般情况 下rpcbind运行在111端口。 并且NFS配置开 启rpcbind_ enable=”YES” 二、nmap探测版本信息 nmap -sV -p 111 192.168.1.106 三、nmap脚本探测信息 nmap -p 111 --script=rpcbind 192.168.1.106 四、msf探测漏洞 use auxiliary/scanner/misc/sunrpc_portmapper show options
' + exit 1 其中关键的一句No portmap or rpcbind service is running on this host. Please start portmap or rpcbind service befor,翻译过来就会发现问题不难解决了,很简单嘛! 百度翻译:此主机上没有运行portmap或rpcbind服务。 在尝试启动此主机上的NFS网关角色之前,请先启动portmap或rpcbind服务。 说明没启动 RPC 相关服务,或者说压根就没装。 这里就不多废话,直接一步到位,安装 rpcbind 并启动就OK。 # 安装 yum install nfs-utils rpcbind # 启动 systemctl start rpcbind.service # 检查 systemctl status rpcbind.service
在一般的RPC应用当中,作为开发人员一般分为了三种,第一种就是提供RPC服务的开发人员,第二种就是客户端使用RPC服务的开发人员,以及最重要的设计RPC接口和规范RPC接口的开发人员,前面的案例当中我们将三种角色融在了一起,虽然看起来非常的方便,但是非常的不利于后期的维护以及二次开发
它的工作原理是当RPC服务启动时,它会告诉RPCBind它正在监听的地址,以及它准备服务的RPC服务号;当客户端希望对给定的服务号进行RPC调用时,客户端首先需要联系服务器上的RPCBind,以确定应该在哪里发送 利用RPCBind进行UDP反射DDoS攻击的事件相对较少,这也是腾讯云安全今年以来捕获的首例利用云主机上的RPCBind服务进行UDP反射DDoS攻击的行为。 RPCBind服务,建议直接关闭,操作如下: Ubuntu系统: 1)打开终端,运行如下命令,关闭rpcbind服务: sudo systemctl stop rpcbind.socket && sudo systemctl disable rpcbind.socket 2)检查rpcbind服务是否关闭: netstat -anp |grep rpcbind CentOS 系统: 1)打开终端,运行如下命令: systemctl stop rpcbind.socket && systemctl disable rpcbind.socket 2)检查rpcbind
Sep 29 09:39:47 myhost systemd: rpcbind.socket failed to listen on sockets: Address family not supported by protocol Sep 29 09:39:47 myhost systemd: Failed to listen on RPCbind Server Activation Socket. 文件 首先查找 rpcbind.socket 文件路径 $ sudo find /etc/ -name '*rpcbind.socket*' /etc/systemd/system/sockets.target.wants /rpcbind.socket 编辑 /etc/systemd/system/sockets.target.wants/rpcbind.socket 文件,将其中 ListenStream 关于IPv6 的部分注释掉,如下: [Unit] Description=RPCbind Server Activation Socket [Socket] ListenStream=/var/run/rpcbind.sock
rpcbind -y #nfs需要的安装包 [root@backup ~]# rpm -qa nfs-utils rpcbind nfs-utils-1.2.3-64.el6.x86_64 rpcbind 启动rpcbind服务 [root@nfs01 ~]# /etc/init.d/rpcbind start [root@nfs01 ~]# netstat -anp | grep 'rpc' unix 2 [ ACC ] STREAM LISTENING 10120 1346/rpcbind /var/run/rpcbind.sock /bin/sh # # rpcbind Start/Stop RPCbind # # chkconfig: 2345 13 87 #运行级别 开机顺序 开始rpcbind服务 [root@web01 ~]# /etc/init.d/rpcbind start Starting rpcbind:
# yum install nfs-utils rpcbind -y #nfs需要的安装包 3 [root@backup ~]# rpm -qa nfs-utils rpcbind 4 nfs-utils 14 unix 2 [ ACC ] STREAM LISTENING 10120 1346/rpcbind /var/run/rpcbind.sock /bin/sh 3 # 4 # rpcbind Start/Stop RPCbind 5 # 6 # chkconfig: 2345 13 87 2 ● rpcbind.service - RPC bind service 3 Loaded: loaded (/usr/lib/systemd/system/rpcbind.service 服务 CentOS 5.x 和 CentOS 6.x 环境 1 [root@web01 ~]# /etc/init.d/rpcbind start 2 Starting rpcbind:
##操作: 首先需要查看192.168.0.194服务器操作系统版本及NFS服务nfs-utils 和rpcbind是否安装 **1. nfs-utils-1.3.0-0.54.el7.x86_64 rpcbind-0.2.0-44.el7.x86_64 **2. **配置完成后,首先启动rpcbind服务 //查看rpcbind启动状态 [root@jijiao-jenkins-centos7 doc_edu]# systemctl status rpcbind.service //启动rpcbind [root@jijiao-jenkins-centos7 doc_edu]# systemctl start rpcbind.service //设置rpcbind为开机自启动 doc_edu]# systemctl list-unit-files|grep enabled|grep rpcbind **5.
[root@localhost ~]# rpm -qa nfs-utils rpcbind rpcbind-0.2.0-13.el6_9.1.x86_64 nfs-utils-1.2.3-75.el6_ @localhost ~]# /etc/init.d/rpcbind start Starting rpcbind: [ OK ] [root@localhost ~]# /etc/init.d/rpcbind status rpcbind (pid 1958) is running... rpcbind is stopped [root@localhost ~]# /etc/init.d/rpcbind start Starting rpcbind: [ OK ] [root@localhost ~]# /etc/init.d/rpcbind status rpcbind (pid 1463) is running...
文章目录 NFS介绍 NFS挂载结构图 NFS工作原理简图 NFS 服务器端设置 NFS软件 查看NFS软件包 启动NFS服务 设置rpcbind服务为开机自启动 配置NFS服务 exports文件格式 ,rpc.mountd等等 rpcbind:rpc主程序 NFS可以被视为一个RPC程序,在启动任何一个RPC程序之前,需要做好端口映射工作,这个映射工作就是由rpcbind服务来完成的,因此必须先启动 rpcbind服务 查看NFS软件包 没有安装的话yum install nfs-utils ,yum install rpcbind 进行安装 执行命令rpcinfo -p localhost,如果 rpcbind服务未启动,执行该命令检查时,会报错 解决方法:/etc/init.d/rpcbind start启动rpcbind服务 启动rpcbind服务后,netstat -lnt会发现多出一个 服务为开机自启动 chkconfig rpcbind on chkconfig --level 345 rpcbind on chkconfig --list | egrep “rpcbind|nfs”
## 关闭防火墙 systemctl stop firewalld 安装NFS yum install nfs-utils rpcbind -y 检查安装结果 rpm -qa nfs-utils rpcbind 加入开机启动 systemctl enable nfs systemctl enable rpcbind 启动NFS和rpcbind systemctl start nfs systemctl start rpcbind 查看NFS启动状态systemctl status nfs ? -y ## 将NFS加入开启启动 systemctl enable nfs ## 将rpcbind加入开启启动 systemctl enable rpcbind ##启动NFS systemctl start nfs ## 启动RPCbind systemctl start rpcbind 将应用文件夹挂载到服务器上 mount –t nfs 172.31.63.132:/app
这些服务在启动时,都需要向rpcbind服务注册一个端口,rpcbind服务随机选取一个未被使用的端口予以分配。 注意:由于rpc service在启动时需要向rpcbind注册端口,所以rpcbind要先启动。 另外若rpcbind重新启动,原来注册的数据也会不见,因此一但rpcbind重新启动,让所管理的服务因为需要重新启动以重新向rpcbind注册。 )和rpcbind(rpc主程序), 不过当使用yum安装nfs-utils时会把rpcbind一起安装上。 服务,只需要启动rpcbind服务。
这些服务在启动时,都需要向rpcbind服务注册一个端口,rpcbind服务随机选取一个未被使用的端口予以分配。 注意:由于rpc service在启动时需要向rpcbind注册端口,所以rpcbind要先启动。 另外若rpcbind重新启动,原来注册的数据也会不见,因此一但rpcbind重新启动,让所管理的服务因为需要重新启动以重新向rpcbind注册。 (nfs服务主程序)和rpcbind(rpc主程序), 不过当使用yum安装nfs-utils时会把rpcbind一起安装上。 服务,只需要启动rpcbind服务。
rpcbind:CentOS.x下面RPC的主程序。NFS可视为一个rpc程序,在互动任何一个RPC程序之前,需要做好端口和功能的对应映射工作,这个映射工作就是由RPCBIND服务来完成的。 因此,在提供NFS服务之前必须先启动RPCBIND服务。 ) 3、启用rpcbind服务(/etc/init.d/rpcbind start){先} 4、查看rpcinfo服务信息(rpcinfo -p localhost) 5、启用nfs服务(/etc/ 服务和nfs服务是否启动(/etc/init.d/rpcbind status,/etc/init.d/nfs status) 9、确保有注册的端口(rpcinfo -p localhost) 10 服务(/etc/init.d/rpcbind start) 2、查看rpcbind服务(/etc/init.d/rpcbind status) 3、设置开机启动( chkconfig rpcbind on
192.168.2.4 用作 nfs服务端 192.168.2.6 用作 nfs客户端 二、 配置NFS服务端 执行以下命令安装 nfs 服务器所需的软件包 yum -y install nfs-utils rpcbind insecure,sync,no_subtree_check,no_root_squash) 执行以下命令,启动 nfs 服务 #配置生效 exportfs -r #查看生效 exportfs #启动rpcbind 、nfs服务 systemctl restart rpcbind && systemctl enable rpcbind systemctl restart nfs && systemctl enable nfs 三、配置NFS客户端 执行以下命令安装 nfs 服务器所需的软件包 yum -y install nfs-utils rpcbind 启动nfs服务 #启动rpcbind、nfs服务 systemctl restart rpcbind && systemctl enable rpcbind systemctl restart nfs && systemctl enable nfs 执行以下命令检查
或者rpcbind服务。 定位到问题原因了,没安装portmap或者rpcbind服务。 2.安装rpcbind [root@cdh1 ~]# rpm -qa |grep rpcbind rpcbind-0.2.0-32.el7.x86_64 ? [root@cdh1 ~]# systemctl start rpcbind [root@cdh1 ~]# systemctl status rpcbind ● rpcbind.service - RPC -w ${RPCBIND_ARGS} (code=exited, status=0/SUCCESS) Main PID: 2576 (rpcbind) CGroup: /system.slice
rpcbind服务rpcbind服务的功能作用rpcbind服务能够将RPC程序号码和通用地址相互转换。rpcbind服务原理1. rpcbind服务相关信息软件包: rpcbind启动命令: systemctl start rpcbind服务端口: TCP111 和UDP111NFS挂载原理RPC和NFS如何通信总结:客户端NFS *之前rpcbind叫portmapNFS系统守护进程nfs:它是基本的NFS守护进程主要功能是管理客户端是否能够登录服务器rpcbind:主要功能是进行端口映射工作。 和nfs两个服务,并且rpcbind一定要先于nfs启动。 rpcbind stop4、设置NFS服务器的自动启动状态设置rpcbind和nfs服务在系统运行级别2345自动启动。
这些服务在启动时,都需要向rpcbind服务注册一个端口,rpcbind服务随机选取一个未被使用的端口予以分配。 注意:由于rpc service在启动时需要向rpcbind注册端口,所以rpcbind要先启动。 另外若rpcbind重新启动,原来注册的数据也会不见,因此一但rpcbind重新启动,让所管理的服务因为需要重新启动以重新向rpcbind注册。 )和rpcbind(rpc主程序), 不过当使用yum安装nfs-utils时会把rpcbind一起安装上。 服务,只需要启动rpcbind服务。
安装nfs-untils和rpcbind软件包:yum -y install nfs-utils rpcbind必须先启动rpcbindsystemctl restart rpcbindsystemctl enable rpcbind确定rpcbind服务是否开启:netstat -anpt | grep :111创建共享目录,修改nfs配置文件:mkdir /htmlvim /etc/exports添加内容 客户端必须都安装nfs-utils软件包和rpcbind软件包:安装这个软件才可以使用命令挂载:yum -y install nfs-utils rpcbind2. 第二步:2号和3号虚拟机搭建Apache服务器两台:NFS服务器端和客户端都需要安装nfs-utils rpcbind安装nfs-untils和rpcbind软件包:yum -y install nfs-utils rpcbind设置网卡信息2号虚拟机:Apache Server1,单网卡,10网段,192.168.10.233号虚拟机:Apache Server2,单网卡,11网段,192.168.11.33安装
NFS服务端安装配置目录概要 yum install -y nfs-utils rpcbind vim /etc/exports //加入如下内容 /home/nfstestdir 192.168.133.0 1000,anongid=1000) 保存配置文件后,执行如下准备操作 mkdir /home/nfstestdir chmod 777 /home/nfstestdir systemctl start rpcbind systemctl start nfs systemctl enable rpcbind systemctl enable nfs NFS服务端安装配置 首先准备两台机器,我这里准备两台虚拟机,A机器 yum install -y nfs-utils rpcbind [root@hanfeng ~]# yum install -y nfs-utils rpcbind 将B机器作为客户端,安装 nfs-utils Ss 03:05 0:00 /sbin/rpcbind -w rpcuser 4530 0.0 0.1 42380 1744 ?