~]# uname -r2.6.32-642.el6.x86_64[root@nfsclient ~]# uname -mx86_64
Check whether the service is installed
[root@nfsserver ~]# rpm -aq nfs-utils rpcbind
Install services
# There can be two methods here, one is normal yum installation, and the other is yum group installation # use these two methods on the server and client respectively [root @ nfsserver ~] # Yum install nfs-utils rpcbind-y
Start the rpc service
# You must first enable the rpc service and enable the nfs service. Otherwise, the n
, regardless of data to the hard disk No_root_ Squash indicates that the root user does not map root_squash that the root user does the mapping All_squash that all users are mappedCreate a shared directory and set permissions[Email protected] ~]# mkdir/data-p[[email protected] ~]# chown-r Nfsnobody.nfsnobody/data/[[email protected] ~]# LL- D/data/drwxr-xr-x 2 nfsnobody nfsnobody 4096 Oct 12:06/data/Description: The NFS shared directory management user is nfsnobody, this user is n
UDP, but for example, to transmit a database, in this case, RPC uses TCP. NFS supports TCP and UDP.
2. as an RPC server, its only task is to make different function calls to different procedure requests. Therefore, RPC server can be made into a single thread (only one request can be processed at the same time ), it can also be made into multiple threads with better performance.
3. RPC does not use a pre-defined port. Instead, RPC defines a list in the/etc/RPC file by using a service number, thi
, trust the local area network, establish an Internet accessible file under/tmp, and the lang environment variable has a buffer overflow. In addition, because it contains consolidated servers, many typical HTTP vulnerabilities can exist (buffer overflow, calendar directory, etc.) 109 POP2 is not as famous as POP3, but many servers offer two services at the same time (backwards compatible). The POP3 vulnerability on the same server also exists in POP2.
The POP3 is used for client access to the se
/nfs file and add:
MOUNTD_PORT = "4002"
STATD_PORT = "4003"
Lockd_tcpports = "4004"
LOCKD_UDPPORT = "4004"
4. configure the firewall
Modify the/etc/sysconfig/IptablesFile, add:
-A input-m state -- state NEW-m tcp-p tcp -- dport 2049-jACCEPT
-A input-m state -- state NEW-m tcp-p tcp -- dport 4002: 4004-jACCEPT
-A input-m state -- state NEW-m udp-p udp -- dport 4002: 4004-jACCEPT
-A input-m state -- state NEW-m tcp-p tcp -- dport 111-jACCEPT
-A input-m state -- state NEW-m udp-p udp -- dport 111-j
rpcbind.servicesystemctl start nfs-server.serviceTo see if the service is started[[emailprotected] ~]# rpcinfo-p program vers proto Port service 100000 4 TCP 111 Portmapper 100 3 TCP 111 Portmapper 100000 2 TCP 111 portmapper 100000 4 UDP 111 Portmapper 10000 0 3 UDP 111 portma
access to server-side mail services. The POP3 service has many recognized weaknesses. There are at least 20 weaknesses in the user name and password Exchange buffer overflow (which means that hacker can enter the system before a real login). There were other buffer overflow errors after the successful landing.Sunrpc portmap rpcbind Sun RPC portmapper/rpcbind. Access Portmapper is the first step in scanning
. exports. allowed. hosts
* Ro
# Stop native service nfs stopservice rpcbind stop # Start NFS service nohup hdfs portmap ... 14/12/24 09:45:13 INFO portmap. portmap: Portmap server started at tcp: // 0.0.0.0: 111, udp: // 0.0.0.0: 111su-hdfshdfs nfs3 # view service status rpcinfo-p test1 program vers proto port service 100000 4 tcp 111 portmapper 100000 3 tcp 111 portmapper 100000 2 tcp 111
versions setuid root, trust the local area network, establish Internet accessible files in/tmp, and the lang environment variable has a buffer overflow. In addition, because it contains consolidated servers, many typical HTTP vulnerabilities may exist (buffer overflow, calendar directory, etc.)
109 POP2 is not as famous as POP3, but many servers offer two of services (backwards compatible). POP3 vulnerabilities exist on the same server in POP2.
The POP3 is used for client access to server-side
Web|web Service |web Server | security | Attack can generate a network diagram that clearly shows the machine type and connection. This program can also perform port scanning, but the function is not as flexible and powerful as nmap.
Network Monitor ethereal (http://ethereal.zing.org/) is used to analyze network transmissions. Ethereal is able to track TCP flows and is useful for knowing plaintext passwords transmitted by Telnet, FTP, POP3, and so on.
With rpcinfo queries using Rpcinfo and
入硬盘
10
insecure 允许从这台机器过来的非授权访问
3. Restart NFS or use the EXPORTFS command to make the settings effectiveRestart NFS:Service NFS RestartWith ExportfsExportfs-rv#exportfs用法-A: All content in Mount or unmount/etc/exports-R: Re-mount/etc/exports in the shared directory-u:umount Directory-V: Output Detailed information to the screenThis way, the server Side of NFS is set up.4. Mount the directory on the client: create a mounted directory locally mkdir/
#showmount –e IP display specifies the share on Server for NFS Directory list (or output list)
7, display the directory information already connected with the client
#showmount-A
8. Clients use the Showmount command to query NFS for shared status
#showmount-e NFS Server IP
Third, mount and firewall configuration
If the firewall on the server side is open, we will be prompted for an error when we execute the mount, as follows:
Mount:mount to NFS server ' 192.168.0.10 ' Failed:system error:
provided by the NFS service. It reads the NFS configuration file/etc/exports to compare client permissions.Portmap/rpcbind: The main function is to do port mapping work. When a client attempts to connect and use a service provided by the RPC server, such as an NFS service, PORTMAP provides the managed port to the client, which enables the client to request services from the server through that port.Third, install NFSrpm–qa| grep NFSrpm-qa| grep rpcbindIn CentOS, the original Portmap changed to
effect the nfs-config service # has to be restarted with the following command: # systemctl restart nfs-config # Optional arguments passed to in-kernel lockd # LOCKDARG = # TCP port rpc. lockd shoshould listen on. # LOCKD_TCPPORT = 32803 # UDP port rpc. lockd shoshould listen on. # LOCKD_UDPPORT = 32769For details, we can compare the file changes in centos6. At the same time, you can find the following parts in/etc/services:# Cat/etc/servicessunrpc 111/tcp
eth0 192.168.0.26 netmask 255.255.255.0
2. Install NFS1 for ubuntu and NFSlingd @ ubuntu :~ $ Sudo apt-get install nfs-kernel-server two software packages nfs-common and portmap are installed at the same time. 2. Modify the NFS configuration file lingd @ ubuntu :~ $ Vi/etc/exports content:/home/lingd/arm 192.168.0. * (rw, sync, no_root_squash, no_subtree_check)
/Home/lingd/arm --- directory 192.168.0 to be shared. * --- the CIDR block that can be accessed, including the IP address, Host Name (w
portmapper rpcbind # RPC 4.0 portmapper TCP
Sunrpc 111/udp portmapper rpcbind # RPC 4.0 portmapper
In addition, set the port number of the mount service to 976.
Cat>/etc/services
Mountd 976/udp
Mountd 976/tcp
Servicenfs restart2. enable the network and Firewall
Set the IP addresses of the source and target machines a
and NFS client have the same UID and account
If nfsserver and nfsclient share the same file account and uid, the client will have the permissions set by/etc/exports when logging on to nfsserver.
2. the NFS server and NFS client have different accounts.
If the nfsclient does not have an nfsserver shared file account, or the nfsclient account does not exist on the nfsserver, whether the shared directory can be read and written depends on the permissions of the nfsserver. Its identity will change
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.