官术网_书友最值得收藏!

  • 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.

主站蜘蛛池模板: 花莲县| 布拖县| 儋州市| 股票| 永新县| 白河县| 屏南县| 龙岩市| 西昌市| 临漳县| 南澳县| 广汉市| 宝鸡市| 泗水县| 察隅县| 云霄县| 吴江市| 高台县| 乐至县| 建昌县| 大渡口区| 贵溪市| 红原县| 岗巴县| 民权县| 新晃| 南溪县| 本溪市| 甘肃省| 体育| 冀州市| 曲沃县| 新野县| 广州市| 南宫市| 勃利县| 珲春市| 松桃| 夏邑县| 龙里县| 昆明市|