网络运维之计算机端口

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
云数据库 RDS MySQL Serverless,价值2615元额度,1个月
简介: 网络运维之计算机端口

@TOC

一、计算机端口介绍

1.定义

端口定义:软件领域的端口一般指网络中面向连接服务和无连接服务的通信协议端口,是一种抽象的软件结构,包括一些数据结构和I/O(基本输入输出)缓冲区。

2.端口理解

计算机“端口”是英文port的义译,可以认为是计算机与外界通讯交流的出口.分软件端口和硬件端口。

3.端口分类

①第一类
公认端口(Well Known Ports):从0到1023,它们紧密绑定(binding)于一些服务。通常这些端口的通讯明确表明了某种服务的协议,例如:80端口实际上总是HTTP通讯。
②第二类
注册端口(Registered Ports):从1024到49151。它们松散地绑定于一些服务。也就是说有许多服务绑定于这些端口,这些端口同样用于许多其它目的。例如:许多系统处理动态端口从1024左右开始。
③第三类
动态和/或私有端口(Dynamic and/or Private Ports):从49152到65535。理论上,不应为服务分配这些端口。实际上,机器通常从1024起分配动态端口。但也有例外:SUN的RPC端口从32768开始。

二、传输层TCP/UDP

1.TCP/UDP解释

TCP:TCP协议全称是传输控制协议是一种面向连接的、可靠的、基于字节流的传输层通信协议。
UDP:UDP协议全称是用户数据报协议,在网络中它与TCP协议一样用于处理数据包,是一种无连接的协议。

2.TCP连接的三次握手

第一次握手:客户端向服务端发送连接请求报文段。该报文段中包含自身的数据通讯初始序号。请求发送后,客户端便进入 SYN-SENT 状态。
第二次握手:服务端收到连接请求报文段后,如果同意连接,则会发送一个应答,该应答中也会包含自身的数据通讯初始序号,发送完成后便进入 SYN-RECEIVED 状态。
第三次握手:当客户端收到连接同意的应答后,还要向服务端发送一个确认报文。客户端发完这个报文段后便进入 ESTABLISHED 状态,服务端收到这个应答后也进入 ESTABLISHED 状态,此时连接建立成功。

3.TCP/UDP应用

TCP:
①FTP:文件传输协议;
②SSH:安全登录、文件传送(SCP)和端口重定向;
③Telnet:不安全的文本传送;
④SMTP:简单邮件传输协议Simple Mail Transfer Protocol (E-mail);
⑤HTTP:超文本传送协议 (WWW);

UDP:
①流媒体
②TFTP
③QQ 文件传输、QQ语音、QQ视频

三、常用的默认端口合集

在这里插入图片描述

四、Linux全部端口查询

[root@tianyi ~]# cat -n /etc/services
 23    tcpmux          1/tcp                           # TCP port service multiplexer
    24    tcpmux          1/udp                           # TCP port service multiplexer
    25    rje             5/tcp                           # Remote Job Entry
    26    rje             5/udp                           # Remote Job Entry
    27    echo            7/tcp
    28    echo            7/udp
    29    discard         9/tcp           sink null
    30    discard         9/udp           sink null
    31    systat          11/tcp          users
    32    systat          11/udp          users
    33    daytime         13/tcp
    34    daytime         13/udp
    35    qotd            17/tcp          quote
    36    qotd            17/udp          quote
    37    chargen         19/tcp          ttytst source
    38    chargen         19/udp          ttytst source
    39    ftp-data        20/tcp
    40    ftp-data        20/udp
    41    # 21 is registered to ftp, but also used by fsp
    42    ftp             21/tcp
    43    ftp             21/udp          fsp fspd
    44    ssh             22/tcp                          # The Secure Shell (SSH) Protocol
    45    ssh             22/udp                          # The Secure Shell (SSH) Protocol
    46    telnet          23/tcp
    47    telnet          23/udp
    48    # 24 - private mail system
    49    lmtp            24/tcp                          # LMTP Mail Delivery
    50    lmtp            24/udp                          # LMTP Mail Delivery
    51    smtp            25/tcp          mail
    52    smtp            25/udp          mail
    53    time            37/tcp          timserver
    54    time            37/udp          timserver
    55    rlp             39/tcp          resource        # resource location
    56    rlp             39/udp          resource        # resource location
    57    nameserver      42/tcp          name            # IEN 116
    58    nameserver      42/udp          name            # IEN 116
    59    nicname         43/tcp          whois
    60    nicname         43/udp          whois
    61    tacacs          49/tcp                          # Login Host Protocol (TACACS)
    62    tacacs          49/udp                          # Login Host Protocol (TACACS)
    63    re-mail-ck      50/tcp                          # Remote Mail Checking Protocol
    64    re-mail-ck      50/udp                          # Remote Mail Checking Protocol
    65    domain          53/tcp                          # name-domain server
    66    domain          53/udp
    67    whois++         63/tcp          whoispp
    68    whois++         63/udp          whoispp
    69    bootps          67/tcp                          # BOOTP server
    70    bootps          67/udp
    71    bootpc          68/tcp          dhcpc           # BOOTP client
    72    bootpc          68/udp          dhcpc
    73    tftp            69/tcp
    74    tftp            69/udp
    75    gopher          70/tcp                          # Internet Gopher
    76    gopher          70/udp
    77    netrjs-1        71/tcp                          # Remote Job Service
    78    netrjs-1        71/udp                          # Remote Job Service
    79    netrjs-2        72/tcp                          # Remote Job Service
    80    netrjs-2        72/udp                          # Remote Job Service
    81    netrjs-3        73/tcp                          # Remote Job Service
    82    netrjs-3        73/udp                          # Remote Job Service
    83    netrjs-4        74/tcp                          # Remote Job Service
    84    netrjs-4        74/udp                          # Remote Job Service
 85    finger          79/tcp
    86    finger          79/udp
    87    http            80/tcp          www www-http    # WorldWideWeb HTTP
    88    http            80/udp          www www-http    # HyperText Transfer Protocol
    89    http            80/sctp                         # HyperText Transfer Protocol
    90    kerberos        88/tcp          kerberos5 krb5  # Kerberos v5
    91    kerberos        88/udp          kerberos5 krb5  # Kerberos v5
    92    supdup          95/tcp
    93    supdup          95/udp
    94    hostname        101/tcp         hostnames       # usually from sri-nic
    95    hostname        101/udp         hostnames       # usually from sri-nic
    96    iso-tsap        102/tcp         tsap            # part of ISODE.
    97    csnet-ns        105/tcp         cso             # also used by CSO name server
    98    csnet-ns        105/udp         cso
    99    # unfortunately the poppassd (Eudora) uses a port which has already
   100    # been assigned to a different service. We list the poppassd as an
   101    # alias here. This should work for programs asking for this service.
   102    # (due to a bug in inetd the 3com-tsmux line is disabled)
   103    #3com-tsmux     106/tcp         poppassd
   104    #3com-tsmux     106/udp         poppassd
   105    rtelnet         107/tcp                         # Remote Telnet
   106    rtelnet         107/udp
   107    pop2            109/tcp         pop-2 postoffice        # POP version 2
   108    pop2            109/udp         pop-2
   109    pop3            110/tcp         pop-3           # POP version 3
   110    pop3            110/udp         pop-3
   111    sunrpc          111/tcp         portmapper rpcbind      # RPC 4.0 portmapper TCP
   112    sunrpc          111/udp         portmapper rpcbind      # RPC 4.0 portmapper UDP
   113    auth            113/tcp         authentication tap ident
   114    auth            113/udp         authentication tap ident
   115    sftp            115/tcp
   116    sftp            115/udp
   117    uucp-path       117/tcp
   118    uucp-path       117/udp
   119    nntp            119/tcp         readnews untp   # USENET News Transfer Protocol
   120    nntp            119/udp         readnews untp   # USENET News Transfer Protocol
   121    ntp             123/tcp
   122    ntp             123/udp                         # Network Time Protocol
   123    netbios-ns      137/tcp                         # NETBIOS Name Service
   124    netbios-ns      137/udp
   125    netbios-dgm     138/tcp                         # NETBIOS Datagram Service
   126    netbios-dgm     138/udp
   127    netbios-ssn     139/tcp                         # NETBIOS session service
   128    netbios-ssn     139/udp
   129    imap            143/tcp         imap2           # Interim Mail Access Proto v2
   130    imap            143/udp         imap2
   131    snmp            161/tcp                         # Simple Net Mgmt Proto
   132    snmp            161/udp                         # Simple Net Mgmt Proto
   133    snmptrap        162/tcp                         # SNMPTRAP
   134    snmptrap        162/udp         snmp-trap       # Traps for SNMP
   135    cmip-man        163/tcp                         # ISO mgmt over IP (CMOT)
   136    cmip-man        163/udp
   137    cmip-agent      164/tcp
   138    cmip-agent      164/udp
   139    mailq           174/tcp                         # MAILQ
   140    mailq           174/udp                         # MAILQ
   141    xdmcp           177/tcp                         # X Display Mgr. Control Proto
   142    xdmcp           177/udp
   143    nextstep        178/tcp         NeXTStep NextStep       # NeXTStep window
   144    nextstep        178/udp         NeXTStep NextStep       # server
   145    bgp             179/tcp                         # Border Gateway Proto.
   146    bgp             179/udp
   147    bgp             179/sctp
   148    prospero        191/tcp                         # Cliff Neuman's Prospero
   149    prospero        191/udp
   150    irc             194/tcp                         # Internet Relay Chat
   151    irc             194/udp
   152    smux            199/tcp                         # SNMP Unix Multiplexer
   153    smux            199/udp
   154    at-rtmp         201/tcp                         # AppleTalk routing
   155    at-rtmp         201/udp
   156    at-nbp          202/tcp                         # AppleTalk name binding
   157    at-nbp          202/udp
   158    at-echo         204/tcp                         # AppleTalk echo
   159    at-echo         204/udp
   160    at-zis          206/tcp                         # AppleTalk zone information
   161    at-zis          206/udp
   162    qmtp            209/tcp                         # Quick Mail Transfer Protocol
   163    qmtp            209/udp                         # Quick Mail Transfer Protocol
   164    z39.50          210/tcp         z3950 z39-50 wais      # NISO Z39.50 database
   165    z39.50          210/udp         z3950 z39-50 wais
   166    ipx             213/tcp                         # IPX
   167    ipx             213/udp
   168    imap3           220/tcp                         # Interactive Mail Access
   169    imap3           220/udp                         # Protocol v3
   170    link            245/tcp         ttylink
   171    link            245/udp         ttylink
   172    gist            270/udp                         # Q-mode encapsulation for GIST messages
   173    fatserv         347/tcp                         # Fatmen Server
   174    fatserv         347/udp                         # Fatmen Server
   175    rsvp_tunnel     363/tcp         rsvp-tunnel
   176    rsvp_tunnel     363/udp         rsvp-tunnel
   177    odmr            366/tcp                         # odmr required by fetchmail
   178    odmr            366/udp                         # odmr required by fetchmail
   179    rpc2portmap     369/tcp
   180    rpc2portmap     369/udp                         # Coda portmapper
   181    codaauth2       370/tcp
   182    codaauth2       370/udp                         # Coda authentication server
   183    ulistproc       372/tcp         ulistserv       # UNIX Listserv
   184    ulistproc       372/udp         ulistserv
   185    ldap            389/tcp
   186    ldap            389/udp
   187    osb-sd          400/tcp                         # Oracle Secure Backup
   188    osb-sd          400/udp                         # Oracle Secure Backup
   189    svrloc          427/tcp                         # Server Location
   190    svrloc          427/udp                         # Server Location
   191    mobileip-agent  434/tcp
   192    mobileip-agent  434/udp
   193    mobilip-mn      435/tcp
   194    mobilip-mn      435/udp
   195    https           443/tcp                         # http protocol over TLS/SSL
196    https           443/udp                         # http protocol over TLS/SSL
   197    https           443/sctp                        # http protocol over TLS/SSL
   198    snpp            444/tcp                         # Simple Network Paging Protocol
   199    snpp            444/udp                         # Simple Network Paging Protocol
   200    microsoft-ds    445/tcp
   201    microsoft-ds    445/udp
   202    kpasswd         464/tcp         kpwd            # Kerberos "passwd"
   203    kpasswd         464/udp         kpwd            # Kerberos "passwd"
   204    photuris        468/tcp
   205    photuris        468/udp
   206    saft            487/tcp                         # Simple Asynchronous File Transfer
   207    saft            487/udp                         # Simple Asynchronous File Transfer
   208    gss-http        488/tcp
   209    gss-http        488/udp
   210    pim-rp-disc     496/tcp
   211    pim-rp-disc     496/udp
   212    isakmp          500/tcp
   213    isakmp          500/udp
   214    gdomap          538/tcp                         # GNUstep distributed objects
   215    gdomap          538/udp                         # GNUstep distributed objects
   216    iiop            535/tcp
   217    iiop            535/udp
   218    dhcpv6-client   546/tcp
   219    dhcpv6-client   546/udp
   220    dhcpv6-server   547/tcp
   221    dhcpv6-server   547/udp
   222    rtsp            554/tcp                         # Real Time Stream Control Protocol
   223    rtsp            554/udp                         # Real Time Stream Control Protocol
   224    nntps           563/tcp                         # NNTP over SSL
   225    nntps           563/udp                         # NNTP over SSL
   226    whoami          565/tcp
   227    whoami          565/udp
   228    submission      587/tcp         msa             # mail message submission
   229    submission      587/udp         msa             # mail message submission
   230    npmp-local      610/tcp         dqs313_qmaster  # npmp-local / DQS
   231    npmp-local      610/udp         dqs313_qmaster  # npmp-local / DQS
   232    npmp-gui        611/tcp         dqs313_execd    # npmp-gui / DQS
   233    npmp-gui        611/udp         dqs313_execd    # npmp-gui / DQS
   234    hmmp-ind        612/tcp         dqs313_intercell # HMMP Indication / DQS
   235    hmmp-ind        612/udp         dqs313_intercell # HMMP Indication / DQS
   236    ipp             631/tcp                         # Internet Printing Protocol
   237    ipp             631/udp                         # Internet Printing Protocol
   238    ldaps           636/tcp                         # LDAP over SSL
   239    ldaps           636/udp                         # LDAP over SSL
   240    acap            674/tcp
   241    acap            674/udp
   242    ha-cluster      694/tcp                         # Heartbeat HA-cluster
   243    ha-cluster      694/udp                         # Heartbeat HA-cluster
   244    kerberos-adm    749/tcp                         # Kerberos `kadmin' (v5)
   245    kerberos-adm    749/udp                         # kerberos administration
   246    kerberos-iv     750/udp         kerberos4 kerberos-sec kdc loadav
   247    kerberos-iv     750/tcp         kerberos4 kerberos-sec kdc rfile
   248    webster         765/tcp                         # Network dictionary
   249    webster         765/udp
   250    phonebook       767/tcp                         # Network phonebook
   251    phonebook       767/udp
   252    rsync           873/tcp                         # rsync
   253    rsync           873/udp                         # rsync
   254    #rquotad unreserved in IANA!
   255    rquotad         875/tcp                         # rquota daemon
   256    #rquotad unreserved in IANA!
   257    rquotad         875/udp                         # rquota daemon
   258    telnets         992/tcp
   259    telnets         992/udp
   260    imaps           993/tcp                         # IMAP over SSL
   261    imaps           993/udp                         # IMAP over SSL
   262    pop3s           995/tcp                         # POP-3 over SSL
   263    pop3s           995/udp                         # POP-3 over SSL
   264    
   265    #
   266    # UNIX specific services
   267    #
   268    exec            512/tcp
   269    biff            512/udp         comsat
   270    login           513/tcp
   271    who             513/udp         whod
   272    shell           514/tcp         cmd             # no passwords used
   273    syslog          514/udp
   274    printer         515/tcp         spooler         # line printer spooler
   275    printer         515/udp         spooler         # line printer spooler
   276    talk            517/udp
 277    ntalk           518/udp
   278    utime           519/tcp         unixtime
   279    utime           519/udp         unixtime
   280    efs             520/tcp
   281    router          520/udp         route routed    # RIP
   282    ripng           521/tcp
   283    ripng           521/udp
   284    timed           525/tcp         timeserver
   285    timed           525/udp         timeserver
   286    tempo           526/tcp         newdate
   287    courier         530/tcp         rpc
   288    conference      531/tcp         chat
   289    netnews         532/tcp
   290    netwall         533/udp                         # -for emergency broadcasts
   291    uucp            540/tcp         uucpd           # uucp daemon
   292    klogin          543/tcp                         # Kerberized `rlogin' (v5)
   293    kshell          544/tcp         krcmd           # Kerberized `rsh' (v5)
   294    afpovertcp      548/tcp                         # AFP over TCP
   295    afpovertcp      548/udp                         # AFP over TCP
   296    remotefs        556/tcp         rfs_server rfs  # Brunhoff remote filesystem
   297    
   298    #
   299    # From ``PORT NUMBERS'':
   300    #
   301    #>REGISTERED PORT NUMBERS
   302    #>
   303    #>The Registered Ports are listed by the IANA and on most systems can be
   304    #>used by ordinary user processes or programs executed by ordinary
   305    #>users.
   306    #>
   307    #>Ports are used in the TCP [RFC793] to name the ends of logical
   308    #>connections which carry long term conversations.  For the purpose of
   309    #>providing services to unknown callers, a service contact port is
   310    #>defined.  This list specifies the port used by the server process as
   311    #>its contact port.
   312    #>
   313    #>The IANA registers uses of these ports as a convienence to the
   314    #>community.
   315    #
   316    socks           1080/tcp                        # socks proxy server
   317    socks           1080/udp                        # socks proxy server
   318    
   319    # Port 1236 is registered as `bvcontrol', but is also used by the
   320    # Gracilis Packeten remote config server.  The official name is listed as
   321    # the primary name, with the unregistered name as an alias.
   322    bvcontrol       1236/tcp        rmtcfg          # Daniel J. Walsh, Gracilis Packeten remote config server
   323    bvcontrol       1236/udp                        # Daniel J. Walsh
   324    
   325    h323hostcallsc  1300/tcp                        # H.323 Secure Call Control
   326    h323hostcallsc  1300/udp                        # H.323 Secure Call Control
   327    ms-sql-s        1433/tcp                        # Microsoft-SQL-Server
   328    ms-sql-s        1433/udp                        # Microsoft-SQL-Server
   329    ms-sql-m        1434/tcp                        # Microsoft-SQL-Monitor
   330    ms-sql-m        1434/udp                        # Microsoft-SQL-Monitor
   331    ica             1494/tcp                        # Citrix ICA Client
   332    ica             1494/udp                        # Citrix ICA Client
   333    wins            1512/tcp                        # Microsoft's Windows Internet Name Service
   334    wins            1512/udp                        # Microsoft's Windows Internet Name Service
   335    ingreslock      1524/tcp
   336    ingreslock      1524/udp
   337    prospero-np     1525/tcp        orasrv          # Prospero non-privileged/oracle
   338    prospero-np     1525/udp        orasrv
   339    datametrics     1645/tcp        old-radius sightline    # datametrics / old radius entry
   340    datametrics     1645/udp        old-radius sightline    # datametrics / old radius entry
   341    sa-msg-port     1646/tcp        old-radacct     # sa-msg-port / old radacct entry
   342    sa-msg-port     1646/udp        old-radacct     # sa-msg-port / old radacct entry
   343    kermit          1649/tcp
   344    kermit          1649/udp
   345    l2tp            1701/tcp        l2f
   346    l2tp            1701/udp        l2f
   347    h323gatedisc    1718/tcp
   348    h323gatedisc    1718/udp
   349    h323gatestat    1719/tcp
350    h323gatestat    1719/udp
   351    h323hostcall    1720/tcp
   352    h323hostcall    1720/udp
   353    h323hostcall    1720/sctp                       # H.323 Call Control
   354    tftp-mcast      1758/tcp
   355    tftp-mcast      1758/udp
   356    mtftp           1759/udp        spss-lm
   357    vdab            1775/tcp                        # data interchange between visual processing containers
   358    hello           1789/tcp
   359    hello           1789/udp
   360    radius          1812/tcp                        # Radius
   361    radius          1812/udp                        # Radius
   362    radius-acct     1813/tcp        radacct         # Radius Accounting
   363    radius-acct     1813/udp        radacct         # Radius Accounting
   364    mtp             1911/tcp                        #
   365    mtp             1911/udp                        #
   366    hsrp            1985/tcp                        # Cisco Hot Standby Router Protocol
   367    hsrp            1985/udp                        # Cisco Hot Standby Router Protocol
   368    licensedaemon   1986/tcp
   369    licensedaemon   1986/udp
   370    gdp-port        1997/tcp                        # Cisco Gateway Discovery Protocol
   371    gdp-port        1997/udp                        # Cisco Gateway Discovery Protocol
   372    sieve-filter    2000/tcp        cisco-sccp      # Sieve Mail Filter Daemon
   373    sieve-filter    2000/udp        cisco-sccp      # Sieve Mail Filter Daemon
   374    nfs             2049/tcp        nfsd shilp      # Network File System
   375    nfs             2049/udp        nfsd shilp      # Network File System
   376    nfs             2049/sctp       nfsd shilp      # Network File System
   377    zephyr-srv      2102/tcp                        # Zephyr server
   378    zephyr-srv      2102/udp                        # Zephyr server
   379    zephyr-clt      2103/tcp                        # Zephyr serv-hm connection
   380    zephyr-clt      2103/udp                        # Zephyr serv-hm connection
   381    zephyr-hm       2104/tcp                        # Zephyr hostmanager
   382    zephyr-hm       2104/udp                        # Zephyr hostmanager
   383    cvspserver      2401/tcp                        # CVS client/server operations
   384    cvspserver      2401/udp                        # CVS client/server operations
   385    venus           2430/tcp                        # codacon port
   386    venus           2430/udp                        # Venus callback/wbc interface
   387    venus-se        2431/tcp                        # tcp side effects
   388    venus-se        2431/udp                        # udp sftp side effect
   389    codasrv         2432/tcp                        # not used
     390    codasrv         2432/udp                        # server port
   391    codasrv-se      2433/tcp                        # tcp side effects
   392    codasrv-se      2433/udp                        # udp sftp side effectQ
   393    
   394    # Ports numbered 2600 through 2606 are used by the zebra package without
   395    # being registred.  The primary names are the registered names, and the
   396    # unregistered names used by zebra are listed as aliases.
   397    hpstgmgr        2600/tcp        zebrasrv        # HPSTGMGR
   398    hpstgmgr        2600/udp                        # HPSTGMGR
   399    discp-client    2601/tcp        zebra           # discp client
   400    discp-client    2601/udp                        # discp client
   401    discp-server    2602/tcp        ripd            # discp server
   402    discp-server    2602/udp                        # discp server
   403    servicemeter    2603/tcp        ripngd          # Service Meter
   404    servicemeter    2603/udp                        # Service Meter
   405    nsc-ccs         2604/tcp        ospfd           # NSC CCS
   406    nsc-ccs         2604/udp                        # NSC CCS
   407    nsc-posa        2605/tcp        bgpd            # NSC POSA
   408    nsc-posa        2605/udp                        # NSC POSA
   409    netmon          2606/tcp        ospf6d          # Dell Netmon
   410    netmon          2606/udp                        # Dell Netmon
   411    dict            2628/tcp                        # RFC 2229
   412    dict            2628/udp                        # RFC 2229
   413    corbaloc        2809/tcp                        # CORBA naming service locator
   414    icpv2           3130/tcp                        # Internet Cache Protocol V2 (Squid)
   415    icpv2           3130/udp                        # Internet Cache Protocol V2 (Squid)
   416    mysql           3306/tcp                        # MySQL
   417    mysql           3306/udp                        # MySQL
   418    trnsprntproxy   3346/tcp                        # Trnsprnt Proxy
   419    trnsprntproxy   3346/udp                        # Trnsprnt Proxy
   420    pxe             4011/udp        altserviceboot  # PXE server
   421    fud             4201/udp                        # Cyrus IMAP FUD Daemon
   422    rwhois          4321/tcp                        # Remote Who Is
   423    rwhois          4321/udp                        # Remote Who Is
   424    krb524          4444/tcp        nv-video        # Kerberos 5 to 4 ticket xlator
   425    krb524          4444/udp        nv-video        # Kerberos 5 to 4 ticket xlator
   426    rfe             5002/tcp                        # Radio Free Ethernet
   427    rfe             5002/udp                        # Actually uses UDP only
   428    cfengine        5308/tcp                        # CFengine
   429    cfengine        5308/udp                        # CFengine
   430    cvsup           5999/tcp        CVSup           # CVSup file transfer/John Polstra/FreeBSD

五、端口帮助查询

1.服务端口查询netstat

[root@tianyi ~]# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1252/sshd           
tcp        0      0 0.0.0.0:10050           0.0.0.0:*               LISTEN      18644/zabbix_agentd 
tcp        0      0 0.0.0.0:10051           0.0.0.0:*               LISTEN      18642/zabbix_server 
tcp6       0      0 :::21                   :::*                    LISTEN      945/vsftpd          
tcp6       0      0 :::22                   :::*                    LISTEN      1252/sshd           
tcp6       0      0 :::10050                :::*                    LISTEN      18644/zabbix_agentd 
tcp6       0      0 :::10051                :::*                    LISTEN      18642/zabbix_server 
tcp6       0      0 :::33060                :::*                    LISTEN      18552/mysqld        
tcp6       0      0 :::3306                 :::*                    LISTEN      18552/mysqld        
tcp6       0      0 :::80                   :::*                    LISTEN      18728/httpd         
udp        0      0 192.168.1.209:68        0.0.0.0:*                           1338/NetworkManager 
[root@tianyi ~]# netstat -tunlp |grep http
tcp6       0      0 :::80                   :::*                    LISTEN      18728/httpd

2.服务端口查询/etc/services

[root@control ~]# grep -w https /etc/services 
https           443/tcp                         # http protocol over TLS/SSL
https           443/udp                         # http protocol over TLS/SSL
https           443/sctp                        # http protocol over TLS/SSL
oob-ws-https    664/tcp                 # DMTF out-of-band secure web services management protocol
llsurfup-https  1184/tcp                # LL Surfup HTTPS
llsurfup-https  1184/udp                # LL Surfup HTTPS
compaq-https    2381/tcp                # Compaq HTTPS
compaq-https    2381/udp                # Compaq HTTPS
wap-push-https  4036/tcp                # WAP Push OTA-HTTP secure
wap-push-https  4036/udp                # WAP Push OTA-HTTP secure
appserv-https   4849/tcp                # App Server - Admin HTTPS
appserv-https   4849/udp                # App Server - Admin HTTPS
wbem-https      5989/tcp                # WBEM CIM-XML (HTTPS)
wbem-https      5989/udp                # WBEM CIM-XML (HTTPS)
wbem-exp-https  5990/tcp                # WBEM Export HTTPS
wbem-exp-https  5990/udp                # WBEM Export HTTPS
sun-sr-https    6443/tcp                # Service Registry Default HTTPS Domain
sun-sr-https    6443/udp                # Service Registry Default HTTPS Domain
plysrv-https    6771/tcp                # PolyServe https
plysrv-https    6771/udp                # PolyServe https
smc-https       6789/tcp                # SMC-HTTPS
smc-https       6789/udp                # SMC-HTTPS
oracleas-https  7443/tcp                # Oracle Application Server HTTPS
oracleas-https  7443/udp                # Oracle Application Server HTTPS
sun-user-https  7677/tcp                # Sun App Server - HTTPS
sun-user-https  7677/udp                # Sun App Server - HTTPS
pcsync-https    8443/tcp                # PCsync HTTPS
pcsync-https    8443/udp                # PCsync HTTPS
https-wmap      8991/tcp                # webmail HTTPS service
https-wmap      8991/udp                # webmail HTTPS service
armcenterhttps  9295/tcp                # ARMCenter https Service
armcenterhttps  9295/udp                # ARMCenter https Service
tungsten-https  9443/tcp                # WSO2 Tungsten HTTPS
tungsten-https  9443/udp                # WSO2 Tungsten HTTPS
amt-soap-https  16993/tcp               # Intel(R) AMT SOAP/HTTPS
amt-soap-https  16993/udp               # Intel(R) AMT SOAP/HTTPS
commtact-https  20003/tcp               # Commtact HTTPS
commtact-https  20003/udp               # Commtact HTTPS
相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
1月前
|
存储 安全 网络安全
网络安全威胁——计算机病毒
网络安全威胁——计算机病毒
|
2月前
|
安全 网络安全 数据安全/隐私保护
|
2月前
|
网络协议 算法 Linux
【计算机】网络基础
独立模式 数据在每台计算机中呈现串行的方式传递 网络互联 多台计算机连接在一起,完成数据共享
17 0
|
2月前
|
安全 网络协议 网络安全
探索网络定位与连接:域名和端口的关键角色
探索网络定位与连接:域名和端口的关键角色
44 0
|
2月前
|
网络协议 Unix Linux
【网络安全 | 信息收集】操作系统判定及端口扫描(全网最详析)
【网络安全 | 信息收集】操作系统判定及端口扫描(全网最详析)
67 0
|
3月前
|
算法 前端开发 网络协议
【计算机网络第一章知识点总结】 - - - 我为何钟情于计算机:一段有趣的选择之旅
【计算机网络第一章知识点总结】 - - - 我为何钟情于计算机:一段有趣的选择之旅
27 0
|
3月前
|
SQL XML Java
计算机毕设论文|基于网络超市商品销售管理系统的设计与实现
计算机毕设论文|基于网络超市商品销售管理系统的设计与实现
|
3月前
水星 SG108 PRO/1.0 网络端口镜像 使用流程
水星 SG108 PRO/1.0 网络端口镜像 使用流程
39 1
|
3月前
|
运维 监控 网络协议
端口号大揭秘:网络世界的“门牌号”有多牛?
端口号大揭秘:网络世界的“门牌号”有多牛?
61 0
|
8月前
|
运维 网络协议 安全
计算机与网络发展的7个阶段【图解TCP/IP(笔记一)】
计算机与网络发展的7个阶段【图解TCP/IP(笔记一)】