- Ansible Quick Start Guide
- Mohamed Alibi
- 150字
- 2021-07-23 16:37:49
The sysctl control module
This is a module to manage the sysctl attributes. As this module can change some of the kernel behaviours, let's make sure we keep it safe. We are going to do a configuration to make the Linux server act as a gateway. We will not be covering "IPtables" rules in depth in this section. We are going to use a generic sample configuration and try to apply it via the sysctl module.
The playbook to run the module should contain the following:
- name: enable IP forwarding on IP version 4
sysctl:
name: net.ipv4.ip_forward
value: 1
sysctrl_set: yes
state: present
reload: yes
A reload option is needed when the task is required to run sysctl -p after the change has been made. This task, with the right firewall rules set, will enable this host to route a packet from one network interface to the other.
推薦閱讀
- 大學計算機信息技術導論
- 虛擬儀器設計測控應用典型實例
- Hands-On Artificial Intelligence on Amazon Web Services
- 空間機器人遙操作系統及控制
- 空間傳感器網絡復雜區域智能監測技術
- 西門子S7-200 SMART PLC實例指導學與用
- JSF2和RichFaces4使用指南
- AutoCAD 2012中文版繪圖設計高手速成
- 網絡綜合布線設計與施工技術
- 工業機器人操作與編程
- 觸控顯示技術
- 基于Xilinx ISE的FPAG/CPLD設計與應用
- 計算機與信息技術基礎上機指導
- Applied Data Visualization with R and ggplot2
- Linux內核精析