在网络中标准的端口范围是多少到多少?

在网络中标准的端口范围是多少到多少?,第1张

端口的取值范围是:0-65535。

在这个取值范围中1023以下的端口已经分配给了常用的一些应用程序,这个数字以后的端口部分被使用,所以网络编程可用的端口一般在1024之后选取。

在网络技术中,端口(Port)大致有两种意思:

1、物理意义上的端口,比如,ADSL Modem、集线器、交换机、路由器用于连接其他网络设备的接口,如RJ-45端口、SC端口等等;

2、逻辑意义上的端口,一般是指TCP/IP协议中的端口,端口号的范围从0到65535,比如用于浏览网页服务的80端口,用于FTP服务的21端口等等。

扩展资料

各个端口及端口号的实际用途

1、1系端口

POP3服务器开放102端口,用于接收邮件,客户端访问服务器端的邮件服务;NEWS新闻组传输协议,承载USENET通信。这个端口的连接通常是人们在寻找USENET服务器;137、138是UDP端口,当通过网上邻居传输文件时用这个端口。

2、2系端口

FTP服务器开放的21端口,用于上传、下载。最常见的攻击者用于寻找打开anonymous的FTP服务器的方法。这些服务器带有可读写的目录;PcAnywhere建立的TCP和22端口的连接可能是为了寻找ssh;扫描23端口是为了找到机器运行的操作系统。

3、3系端口

轻型目录访问协议和NetMeeting Internet Locator Server共用389端口。

4、4系端口

网页浏览443端口,能提供加密和通过安全端口传输的另一种HTTP;木马HACKERS PARADISE开放456端口。

-端口号

-网络端口

1 首先在win7下找到运行,但是win7的运行不像XP那么好找,win7运行的位置在:开始→所有程序→附件→运行。

2 然后在对话框中,输入cmd(大小写均可)。

3 然后是如何查看80端口的方法,一般会用这两种方法:

1)输入netstat -ano

2)输入:netstat -ano|findstr 80

这两种方法都可以查看到80端口,查看到80端口,主要是来看PID的,以便在进程中结束占用80端口的程序

4 然后是打开任务管理器(打开进程方法:1ctrl+alt+delete;2右键电脑最下面的任务栏,选择任务管理器),查看占用80端口的进程及PID。

5 然后再到进程下面,,选择列,然后将PID前面打上√,确定即可,然后在进程中找到刚才占用80端口的PID,将其关闭,即可。

Tomcat服务器安装的时候默认的端口设置是8080,通常我一看到端口是8080的网站,我就猜测服务器估计是Tomcat,一般来说网站的端口普遍

是80,apache服务器的默认端口就是80,而80与8080端口有一点区别就是,如果你去访问80端口的网站,那么可以直接输入域名访问,而没必要

带上80,因为80是http协议的默认端口;但是,如果是访问8080端口的网站,那么在输入域名以后还要加上8080才行。就是因为这个繁琐的操作,

所以我每次都会修改下端口,修改方法可以参考下面:

(1)首先找到tomcat的安装路径,找到路径conf文件夹下面的serverxml文件,如下图1所示。

图1:serverxml所在路径

(2)用文本编辑器打开serverxml,修改其中端口,文件中端口有很多,比如8005,8080,8009等等,别的都可以不用管,视情况修改就好,我只修改了8080端口为80,直接查找8080替换成80就OK了,修改后的文件内容如下:

<xml version='10' encoding='utf-8'>

<!--

Licensed to the Apache Software Foundation (ASF) under one or more

contributor license agreements See the NOTICE file distributed with

this work for additional information regarding copyright ownership

The ASF licenses this file to You under the Apache License, Version 20

(the "License"); you may not use this file except in compliance with

the License You may obtain a copy of the License at

http://wwwapacheorg/licenses/LICENSE-20

Unless required by applicable law or agreed to in writing, software

distributed under the License is distributed on an "AS IS" BASIS,

WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied

See the License for the specific language governing permissions and

limitations under the License

-->

<!-- Note: A "Server" is not itself a "Container", so you may not

define subcomponents such as "Valves" at this level

Documentation at /docs/config/serverhtml

-->

<Server port="8005" shutdown="SHUTDOWN">

<!--APR library loader Documentation at /docs/aprhtml -->

<Listener className="orgapachecatalinacoreAprLifecycleListener" SSLEngine="on" />

<!--Initialize Jasper prior to webapps are loaded Documentation at /docs/jasper-howtohtml -->

<Listener className="orgapachecatalinacoreJasperListener" />

<!-- Prevent memory leaks due to use of particular java/javax APIs-->

<Listener className="orgapachecatalinacoreJreMemoryLeakPreventionListener" />

<!-- JMX Support for the Tomcat server Documentation at /docs/non-existenthtml -->

<Listener className="orgapachecatalinambeansServerLifecycleListener" />

<Listener className="orgapachecatalinambeansGlobalResourcesLifecycleListener" />

<!-- Global JNDI resources

Documentation at /docs/jndi-resources-howtohtml

-->

<GlobalNamingResources>

<!-- Editable user database that can also be used by

UserDatabaseRealm to authenticate users

-->

<Resource name="UserDatabase" auth="Container"

type="orgapachecatalinaUserDatabase"

description="User database that can be updated and saved"

factory="orgapachecatalinausersMemoryUserDatabaseFactory"

pathname="conf/tomcat-usersxml" />

</GlobalNamingResources>

<!-- A "Service" is a collection of one or more "Connectors" that share

a single "Container" Note: A "Service" is not itself a "Container",

so you may not define subcomponents such as "Valves" at this level

Documentation at /docs/config/servicehtml

-->

<Service name="Catalina">

<!--The connectors can use a shared executor, you can define one or more named thread pools-->

<!--

<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"

maxThreads="150" minSpareThreads="4"/>

-->

<!-- A "Connector" represents an endpoint by which requests are received

and responses are returned Documentation at :

Java HTTP Connector: /docs/config/httphtml (blocking & non-blocking)

Java AJP Connector: /docs/config/ajphtml

APR (HTTP/AJP) Connector: /docs/aprhtml

Define a non-SSL HTTP/11 Connector on port 8080

-->

<Connector port="80" protocol="HTTP/11"

connectionTimeout="20000"

redirectPort="8443" />

<!-- A "Connector" using the shared thread pool-->

<!--

<Connector executor="tomcatThreadPool"

port="8080" protocol="HTTP/11"

connectionTimeout="20000"

redirectPort="8443" />

-->

<!-- Define a SSL HTTP/11 Connector on port 8443

This connector uses the JSSE configuration, when using APR, the

connector should be using the OpenSSL style configuration

described in the APR documentation -->

<!--

<Connector port="8443" protocol="HTTP/11" SSLEnabled="true"

maxThreads="150" scheme="https" secure="true"

clientAuth="false" sslProtocol="TLS" />

-->

<!-- Define an AJP 13 Connector on port 8009 -->

<Connector port="8009" protocol="AJP/13" redirectPort="8443" />

<!-- An Engine represents the entry point (within Catalina) that processes

every request The Engine implementation for Tomcat stand alone

analyzes the HTTP headers included with the request, and passes them

on to the appropriate Host (virtual host)

Documentation at /docs/config/enginehtml -->

<!-- You should set jvmRoute to support load-balancing via AJP ie :

<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">

-->

<Engine name="Catalina" defaultHost="localhost">

<!--For clustering, please take a look at documentation at:

/docs/cluster-howtohtml (simple how to)

/docs/config/clusterhtml (reference documentation) -->

<!--

<Cluster className="orgapachecatalinahatcpSimpleTcpCluster"/>

-->

<!-- The request dumper valve dumps useful debugging information about

the request and response data received and sent by Tomcat

Documentation at: /docs/config/valvehtml -->

<!--

<Valve className="orgapachecatalinavalvesRequestDumperValve"/>

-->

<!-- This Realm uses the UserDatabase configured in the global JNDI

resources under the key "UserDatabase" Any edits

that are performed against this UserDatabase are immediately

available for use by the Realm -->

<Realm className="orgapachecatalinarealmUserDatabaseRealm"

resourceName="UserDatabase"/>

<!-- Define the default virtual host

Note: XML Schema validation will not work with Xerces 22

-->

<Host name="localhost" appBase="webapps"

unpackWARs="true" autoDeploy="true"

xmlValidation="false" xmlNamespaceAware="false">

<!-- SingleSignOn valve, share authentication between web applications

Documentation at: /docs/config/valvehtml -->

<!--

<Valve className="orgapachecatalinaauthenticatorSingleSignOn" />

-->

<!-- Access log processes all example

Documentation at: /docs/config/valvehtml -->

<!--

<Valve className="orgapachecatalinavalvesAccessLogValve" directory="logs"

prefix="localhost_access_log" suffix="txt" pattern="common" resolveHosts="false"/>

-->

</Host>

</Engine>

</Service>

</Server>

(3)修改serverxml文件以后,重启tomcat服务器,配置修改成功。

只开放80端口只代表你的服务器的防护上做了一些安全设置,但远远不够。

权限也非常的重要,设置好权限,可以把风险降到最小。

动易不太清楚,对大多数网站来说,你可以把网站目录指向到网站要显示的内容,如/PUBLIC,而不用把整个网站都放到目录下,有一些需要安全性较高的就可以放在目录之外。

你的系统可能会生成静态HTML页面,那么给HTML的文件夹以所有权限。

有上传也需要给权限。

其它调用或执行的动态模块只需要给读取权限。

该网站的用户要使用自己定义的没有任何权限用的用户,再IIS中的安全里面的匿名用户那里使用该用户,这个用户的密码一定要长。

IIS服务那里不使用系统默认的SYSTEM用户,也使用自定义用户。

连接池那里的限制设定好。

多查看日志。

这样就算是程序上有漏洞,也只会影响到网站。

你的情况更像是程序上的问题。

语文没好好学,写的乱,不知道能看明白不。

在服务器中要查看端口,可以使用Netstat命令: 

1、依次点击“开始→运行”,键入“cmd”并回车,打开命令提示符窗口。

2、在命令提示符状态下键入“netstat -a -n”,按下回车键后就可以看到以数字形式显示的TCP和UDP连接的端口号及状态。

端口相关的概念:

在网络技术中,端口(Port)包括逻辑端口和物理端口两种类型。物理端口指的是物理存在的端口,如ADSL Modem、集线器、交换机、路由器上用 于连接其他网络设备的接口,如RJ-45端口、SC端口等等。逻辑端口是指逻辑意义上用于区分服务的端口,如TCP/IP协议中的服务端口,端口号的范围从0到65535,比如用于浏览网页服务的80端口,用于FTP服务的21端口等。由于物理端口和逻辑端口数量较多,为了对端口进行区分,将每个端口进行了编号,这就是端口号

端口按端口号可以分为3大类:

1:公认端口(Well Known Port)

公认端口号从0到1023,它们紧密绑定与一些常见服务,例如FTP服务使用端口21,你在 /etc/services 里面可以看到这种映射关系。 

2:注册端口(Registered Ports): 

从1024到49151。它们松散地绑定于一些服务。也就是说有许多服务绑定于这些端口,这些端口同样用于许多其它目的。

3: 动态或私有端口(Dynamic and/or Private Ports)

动态端口,即私人端口号(private port numbers),是可用于任意软件与任何其他的软件通信的端口数,使用因特网的传输控制协议,或用户传输协议。动态端口一般4915265535Linux中有限定端口的使用范围,如果我要为我的程序预留某些端口,那么我需要控制这个端口范围。/proc/sys/net/ipv4/ip_local_port_range定义了本地TCP/UDP的端口范围,你可以在/etc/sysctlconf里面定义netipv4ip_local_port_range = 1024 65000。

网上邻居 属性 本地连接 属性 TCP/IP协议 高级 选项 TCP/IP筛选 属性。

控制面板 管理工具 服务 开启80端口

手动打开端口:

1 右键点击网上邻居,选择属性。

2 右键点击用于连接Internet的连接,选择属性。

3 选择高级页,点击设置按钮。

注意:如果设置按钮是灰的,则说明当前的连接没有启用Internet连接防火墙。所有的端口都是打开的。

4 在列表中选择需要打开的端口。

5 如果端口不在列表中,点击添加按钮。

6 在服务描述编辑框中,输入一个描述名称,如文件共享:端口445。

7 在计算机的名称和IP地址编辑框中,输入127001。

8 在外部端口号和内部端口号中输入需要的端口。他们一般是同一个端口号。

9 选择TCP或者UDP,点击确定。

10 重复相面的步骤一个一个的打开需要的端口。

~-~如果你装了服务系统软件的话。默认WWW为80,E-MAIL:25,FTP:21

服务端口号一般是固定的,当有其它的计算机访问你的www服务时,那台计算机要随机开个端口(1024以上)与你的80端口进行通讯,此时你的80端口的TCP状态将会随着不同的阶段而发生变化,而此时21、25等服务端口在没有被访问的情况下是不会发生变化的。

DABAN RP主题是一个优秀的主题,极致后台体验,无插件,集成会员系统
网站模板库 » 在网络中标准的端口范围是多少到多少?

0条评论

发表评论

提供最优质的资源集合

立即查看 了解详情