- Security Automation with Ansible 2
- Madhu Akula Akash Mahajan
- 212字
- 2021-07-02 22:00:00
Hardening nginx
Here, we can start looking at things like disabling server tokens to not display version information, adding headers like X-XSS-Protection, and many other configuration tweaks. Most of these changes are done via configuration changes, and Ansible allows us to version and control and automate these changes based on user requirements:
- The nginx server version information can be blocked by adding the server_tokens off; value to the configuration
- add_header X-XSS-Protection "1; mode=block"; will enable the cross-site scripting (XSS) filter
- SSLv3 can be disabled by adding ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- This list can be pretty large, based on the use case and scenario:
The following code snippet contains nginx configuration template for updating the hardened nginx configuration changes:
- name: update the hardened nginx configuration changes
template:
src: "hardened-nginx-config.j2"
dest: "/etc/nginx/sites-available/default"
notify:
- restart nginx
Mozilla runs an updated web page on guidance for SSL/TLS at https://wiki.mozilla.org/Security/Server_Side_TLS. The guidance offers an opinion on what cipher suites to use, and other security measures. Additionally, if you trust their judgment, you can also use their SSL/TLS configuration generator to quickly generate a configuration for your web server configuration. For more information, visit https://mozilla.github.io/server-side-tls/ssl-config-generator/.
Whichever configuration you decide to use, the template needs to be named as hardened-nginx-config.j2.
- Word 2000、Excel 2000、PowerPoint 2000上機指導與練習
- 我的J2EE成功之路
- 計算機應用基礎·基礎模塊
- 工業(yè)機器人操作與編程
- 基于32位ColdFire構建嵌入式系統(tǒng)
- 工業(yè)機器人安裝與調(diào)試
- 教育機器人的風口:全球發(fā)展現(xiàn)狀及趨勢
- 一步步寫嵌入式操作系統(tǒng)
- 寒江獨釣:Windows內(nèi)核安全編程
- Xilinx FPGA高級設計及應用
- QTP自動化測試實踐
- 網(wǎng)絡安全原理與應用
- Microsoft 365 Mobility and Security:Exam Guide MS-101
- INSTANT R Starter
- 單片機硬件接口電路及實例解析