robertdebock.natrouter
Ansible Role NAT Router
THIS ROLE HAS BEEN ARCHIVED AS OF DEC 2023.
This role helps you set up and configure a NAT router on your system.
GitHub | GitLab | Downloads | Version |
---|---|---|---|
Example Playbook
Here is a sample playbook taken from molecule/default/converge.yml
. It is tested with every push, pull request, and release.
---
- name: Converge
hosts: all
become: yes
gather_facts: yes
roles:
- role: robertdebock.natrouter
To prepare the machine, CI uses molecule/default/prepare.yml
:
---
- name: Prepare
hosts: all
become: yes
gather_facts: no
roles:
- role: robertdebock.bootstrap
- role: robertdebock.sysctl
sysctl_items:
- name: net.ipv4.ip_forward
value: 1
For more details, refer to a full explanation and example on how to use these roles.
Role Variables
Default values for variables are in defaults/main.yml
:
---
# Defaults for NAT router
# The network interface connected to the internet.
natrouter_public_interface: eth0
# The network address to translate.
natrouter_private_network: "192.168.1.0/24"
# The destination.
natrouter_destination: "0.0.0.0/0"
# The protocols to NAT.
natrouter_protocols:
- tcp
- udp
Requirements
- Python packages listed in requirements.txt.
State of Used Roles
The following roles are used to set up your system. You can use other methods if needed.
Requirement | GitHub | GitLab |
---|---|---|
robertdebock.bootstrap | ||
robertdebock.sysctl |
Context
This role is part of a collection of compatible roles. For more information, check the documentation of these roles.
Here’s a diagram of related roles:
Compatibility
This role has been tested with these container images:
Container | Tags |
---|---|
Alpine | all |
EL | 8, 9 |
Debian | all |
Fedora | all |
OpenSUSE | all |
Ubuntu | all |
Ansible version 2.12 or higher is needed. Tests have been conducted on:
- The previous version.
- The current version.
- The development version.
If you find any issues, please report them on GitHub.
License
This project uses the Apache-2.0 license.
Author Information
The author is robertdebock.
If you want to support my work, please consider sponsoring me.
Install and configure a NAT router on your system.
ansible-galaxy install robertdebock.natrouter