In Centos, check whether a port of another host is started.

Source: Internet
Author: User
Tags reverse dns
Take LINUXREDHAT6.3 as an example: insert REDHAT6.3 system ISO image CD11. configure yum local installation Source: log on to the system mkdir/mnt/cdrommount-tiso9660/dev/sr0/mnt/cdromcd/etc/yum as the root user. repos. d

Take LINUX REDHAT6.3 as an example:

Insert REDHAT6.3 system ISO image CD1 to the local machine

1. configure the local installation source of yum:

Log on to the system as a root user

Mkdir/mnt/cdrom

Mount-t iso9660/dev/sr0/mnt/cdrom

Cd/etc/yum. repos. d

Check whether A. repo suffix file exists in the directory. if No. repo file exists, create a. repo file. the file name is random.

Vi local. repo

[LOCAL]name=localbaseurl=file:///mnt/cdromenable=1gpgcheck=0

Yum clean all

2. install nmap and test whether port 80 is enabled for 172.24.40.5.


[root@openlab named]# yum install nmap Loaded plugins: rhnplugin Repository 'LOCAL' is missing name in configuration, using id This system is not registered with RHN. RHN support will be disabled. Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package nmap.i686 2:5.21-3.el6 set to be updated --> Finished Dependency Resolution  Dependencies Resolved  ================================================================================  Package         Arch            Version                 Repository        Size ================================================================================ Installing:  nmap            i686            2:5.21-3.el6            LOCAL            2.2 M  Transaction Summary ================================================================================ Install       1 Package(s) Upgrade       0 Package(s)  Total download size: 2.2 M Installed size: 7.2 M Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction   Installing     : 2:nmap-5.21-3.el6.i686                                   1/1   Installed:   nmap.i686 2:5.21-3.el6                                                          Complete! 
 
[root@openlab named]# nmap -p 80 172.24.40.5  Starting Nmap 5.21 ( http://nmap.org ) at 2013-01-09 17:00 CST mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns-servers Nmap scan report for 172.24.40.5 Host is up (0.00034s latency). PORT   STATE SERVICE 80/tcp open  http MAC Address: 00:0C:29:4E:7D:FE (VMware)  Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds 
Nmap-p 1-200 destination host IP

#1-200 is the port range

 

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.