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

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.

主站蜘蛛池模板: SHOW| 永清县| 深水埗区| 宣威市| 鹤山市| 桂东县| 青海省| 南雄市| 贵阳市| 黑龙江省| 遂平县| 宜章县| 莫力| 辽宁省| 绥滨县| 陆川县| 井陉县| 沈阳市| 婺源县| 南江县| 商水县| 涞源县| 常熟市| 清苑县| 南漳县| 囊谦县| 赣榆县| 九江市| 循化| 新民市| 利津县| 堆龙德庆县| 华蓥市| 洛南县| 德庆县| 慈利县| 临澧县| 广昌县| 北川| 德格县| 乐陵市|