Here's a look at some of the Tomcat security specifications that we need to be aware of in our daily work:
One: Protection of Telnet management port
|
Category |
Configuration content and its description |
Standard configuration |
Note |
|
Telnet
Protection of management ports
Force
|
(1) The default port in the configuration file is 8005 management port, so in order not to attack easily, the best port is changed to other (more than 1024, the proposed interval is 8000~8999)
(2) Change shutdown
Instruction for other strings |
<server port= "=8517" shutdown= "Dangerous" > |
|
II: Protection of AJP management ports:
|
Category |
Configuration content and its description |
Standard configuration |
Note |
|
Protection of the AJP connection port |
(1) Modify the default AJP 8009 port to a port that is not easy to conflict with more than 1024.
(2) Restrict AJP port access to only the server on the line through the iptables rule |
<connector port= "8553 otocol=" ajp/1.3 "redirectport=" 8443 "/> |
The above is recommended configuration, need to modify according to production requirements, port requirements between 8000~8999, the purpose of the protection port is to prevent the offline test traffic is MOD_JK forwarded to the online Tomcat server.
We can use the way of HTTP, but also choose AJP way. If you choose the AJP way, you can change it in the way above. |
Third: Prohibit the use of the management side
|
Category |
Configuration content and its description |
Standard configuration |
Note |
|
Disabling the management side |
|
|
|
Four: Down right start
|
Category |
Configuration content and its description |
Standard configuration |
Note |
|
down right start |
|
|
|
V: Access control for file list
|
Category |
Configuration content and its description |
Standard configuration |
Note |
|
Disabling the management side |
|
|
|
VI: The release information is hidden
|
Category |
Configuration content and its description |
Standard configuration |
Note |
|
Disabling the management side |
|
|
|
Seven: Server header rewrite
|
Category |
Configuration content and its description |
Standard configuration |
Note |
|
Disabling the management side |
|
|
|
Eight: Access restrictions
|
Category |
Configuration content and its description |
Standard configuration |
Note |
|
Disabling the management side |
|
|
|
IX: Permission retraction of the start-stop script
|
Category |
Configuration content and its description |
Standard configuration |
Note |
|
Disabling the management side |
|
|
|
Ten: Specification of Access log format:
|
Category |
Configuration content and its description |
Standard configuration |
Note |
|
Disabling the management side |
|
|
|
Security Specifications for Tomcat