Skip to content

this role manage the iptables persistent installation and making basic configurations on iptables

Notifications You must be signed in to change notification settings

dereliahmet1/iptables-management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

iptables-management

This role is managing the iptables persistent installation and making basic configurations on iptables

  • Installs dependencies
  • Configures services

Requirements

This role is written for Debian based operating systems. Ansible version => 2.10

Note

If you don't have the ssh host key checking configuration in your default config, you can set this environment variable in your machine.

export ANSIBLE_HOST_KEY_CHECKING=False

Tested On

Ubuntu 14.04 - Ubuntu 16.04 - Ubuntu 18.04 - Ubuntu 20.04 - Debian 10 - Debian 9 -

Tested with

Ansible Server Version 2.13 Python Version 3.10

Role Variables

Variable Required Default
installation yes 1
configuration yes 1

Example Playbook

- name: Apply Iptables Installation and Rules
  hosts: all
  become: false
  gather_facts: false
  roles:
    
    - role: iptables.install
      when: installation|default(false)|bool
    
    - role: iptables.apply.rules
      when: configuration|default(false)|bool
 
  vars:
    - installation: 0
    - configuration: 1

Example Hosts File

[all]
instanceA ansible_ssh_host=10.0.0.1 ansible_ssh_user=root ansible_ssh_pass=passwordA
instanceB ansible_ssh_host=10.0.0.2 ansible_ssh_user=root ansible_ssh_pass=passwordB

[server1]
instanceA

[server2]
instanceB

About

this role manage the iptables persistent installation and making basic configurations on iptables

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages