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

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.

主站蜘蛛池模板: 长武县| 桦南县| 荆门市| 西华县| 库尔勒市| 铜川市| 鲜城| 托克托县| 潜山县| 怀化市| 和政县| 龙胜| 宝兴县| 张家界市| 扬州市| 育儿| 凌源市| 日照市| 五原县| 娄底市| 玉树县| 本溪市| 永修县| 方山县| 海林市| 庆阳市| 大理市| 南江县| 洪湖市| 安泽县| 温宿县| 阿鲁科尔沁旗| 体育| 延安市| 马尔康县| 广饶县| 隆化县| 庆云县| 沙雅县| 策勒县| 兴海县|