Ansible role to configure NAT between public and internal network interfaces.
By default it translates traffic between:
- public interface, in public firewalld zone, with ip address =
ansible_host
variable - internal interface, in internal firewalld zone, with ip address =
internal_ip
variable
- ansible.builtin
- ansible.posix
nmcli
- NetworkManager CLI
-
defaults
nat_interfaces: [] # list of network interfaces for NAT traffic - zone: "" # name of firewalld zone interface: "" # name of network interface
No ansible roles dependencies
- nat.firewall - Configure firewall
- nat.firewall.zone - Move interface to zone
- nat.firewall.masquerade - Allow masquerade on public interface
- nat.routing - Configure ip forwarding
- nat.routing.forwarding - Allow ip forwarding
- nat.routing.internal - Disable default routing for non-public interfaces
-
requirements.yaml
- name: nat src: https://github.com/mario-slowinski/nat
-
playbook.yaml
- hosts: servers gather_facts: true roles: - role: nat