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

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.

主站蜘蛛池模板: 潢川县| 莱西市| 桓台县| 赣榆县| 邯郸县| 江华| 盐边县| 公安县| 屏东市| 和静县| 汉源县| 静海县| 德庆县| 伊吾县| 阜阳市| 水城县| 洪泽县| 义乌市| 屯昌县| 韩城市| 清徐县| 棋牌| 揭东县| 崇信县| 广宁县| 汨罗市| 师宗县| 临夏市| 镇安县| 吉木萨尔县| 巩义市| 玉门市| 永兴县| 湖北省| 平阳县| 喀喇| 南澳县| 合山市| 喜德县| 邹平县| 赣州市|