- 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.
推薦閱讀
- 人工免疫算法改進(jìn)及其應(yīng)用
- 工業(yè)機(jī)器人入門(mén)實(shí)用教程(KUKA機(jī)器人)
- Hands-On Cybersecurity with Blockchain
- 計(jì)算機(jī)網(wǎng)絡(luò)技術(shù)實(shí)訓(xùn)
- 計(jì)算機(jī)系統(tǒng)結(jié)構(gòu)
- Learn CloudFormation
- 電氣控制與PLC技術(shù)應(yīng)用
- 工業(yè)機(jī)器人維護(hù)與保養(yǎng)
- Mastering Text Mining with R
- Mastering Ansible(Second Edition)
- Natural Language Processing and Computational Linguistics
- Kubernetes on AWS
- Hands-On Generative Adversarial Networks with Keras
- Keras Reinforcement Learning Projects
- 歐姆龍CP1H型PLC編程與應(yīng)用