简体   繁体   中英

list opened ports, close port and open port under centos

I need to build a bash script to do the following:

  • list opened ports
  • close opened port
  • open port under

What is the plan, packages and configuration to do that?

Use nmap to get the list of host open/close ports

nmap --top-ports 20 hostname

e.g
nmap --top-ports 20 localhost

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM