Ansible Role for managing an opiniated Alpine Router
Find a file
Simon Cornet bd38c7dfc9
All checks were successful
ci/woodpecker/push/linting Pipeline was successful
ci: migrate from gitlab ci to woodpecker
2026-05-15 14:13:51 +02:00
.woodpecker ci: migrate from gitlab ci to woodpecker 2026-05-15 14:13:51 +02:00
defaults feat: add external dhcp option 2026-03-02 13:15:05 +01:00
handlers feat: remove static routes 2026-02-17 18:09:55 +01:00
meta chore: fix galaxy meta information 2026-02-16 14:50:40 +01:00
roles ci: migrate from gitlab ci to woodpecker 2026-05-15 14:13:51 +02:00
tasks feat: remove static routes 2026-02-17 18:09:55 +01:00
templates feat: add external dhcp option 2026-03-02 13:15:05 +01:00
.ansible-lint ci: migrate from gitlab ci to woodpecker 2026-05-15 14:13:51 +02:00
.gitignore chore: add basic role layout for ans-router 2026-02-16 14:15:02 +01:00
.markdownlint-cli2.jsonc ci: migrate from gitlab ci to woodpecker 2026-05-15 14:13:51 +02:00
.yamllint chore: add basic role layout for ans-router 2026-02-16 14:15:02 +01:00
AGENTS.md chore: restructure tasks - install, routing, firewall, performance 2026-02-16 14:17:09 +01:00
playbook.yaml ci: add various configs and linter fixes 2026-02-16 17:51:23 +01:00
readme.md ci: migrate from gitlab ci to woodpecker 2026-05-15 14:13:51 +02:00
renovate.json chore: add basic role layout for ans-router 2026-02-16 14:15:02 +01:00

Ansible Role: Router

Configure router functionality with NAT, firewall, and routing on Alpine Linux.

Variables

Network Interfaces

Variable Required Default Description
wan_interface Yes eth0 WAN network interface
lan_interface Yes eth1 LAN network interface

Firewall Rules

Variable Required Default Description
incoming_firewall_rules No [] List of incoming firewall rules

NAT Configuration

Variable Required Default Description
nat_port_forwards No [] List of NAT port forwarding rules

Tags

Tag Description
full Execute all tasks
routing Configure routing and iptables
firewall Configure firewall rules
performance Configure performance tuning

Example

wan_interface: "eth0"
lan_interface: "eth1"

incoming_firewall_rules:
  - name: "allow ssh from lan"
    source: "192.168.1.0/24"
    protocol: "tcp"
    port: 22
  - name: "allow dns from lan"
    source: "192.168.1.0/24"
    protocol: "udp"
    port: 53

nat_port_forwards:
  - name: "forward https to web server"
    dst: "192.168.1.10"
    port: 443
    protocol: "tcp"