- 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 Internet of Things with MQTT
- 錯覺:AI 如何通過數據挖掘誤導我們
- 基于LPC3250的嵌入式Linux系統開發
- 空間機器人遙操作系統及控制
- OpenStack Cloud Computing Cookbook(Second Edition)
- 我也能做CTO之程序員職業規劃
- The Python Workshop
- INSTANT Heat Maps in R:How-to
- 未來學徒:讀懂人工智能飛馳時代
- 玩轉機器人:基于Proteus的電路原理仿真(移動視頻版)
- Spark Streaming實時流式大數據處理實戰
- Kibana 7 Quick Start Guide
- Internet of Things for Architects