diff --git a/readme.md b/readme.md index 53747f6..b6d0688 100644 --- a/readme.md +++ b/readme.md @@ -1,74 +1,56 @@ -# Overview +# Ansible Role: Router -This role configures router functionality on Alpine Linux. +Configure router functionality with NAT, firewall, and routing on Alpine Linux. -## Supported Operating Systems +## Variables -| Operating System | Version | -| --- | ----- | -| Alpine | 3.23 | +### 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 | Purpose | -| --- | -------- | +| Tag | Description | +|-----|-------------| | `full` | Execute all tasks | | `routing` | Configure routing and iptables | | `firewall` | Configure firewall rules | | `performance` | Configure performance tuning | -## Role Variables - -### Interfaces +## Example ```yaml wan_interface: "eth0" lan_interface: "eth1" -``` -### Incoming Firewall Rules - -```yaml incoming_firewall_rules: - - name: "allow ssh from lan" source: "192.168.1.0/24" protocol: "tcp" port: 22 - - - name: "allow https from lan" - source: "192.168.1.0/24" - protocol: "tcp" - port: 443 - - name: "allow dns from lan" source: "192.168.1.0/24" protocol: "udp" port: 53 - - name: "allow ping from lan" - source: "192.168.1.0/24" - protocol: "icmp" - port: 0 -``` - -### NAT Port Forwards - -```yaml nat_port_forwards: - - - name: "forward http to web server" - dst: "192.168.1.10" - port: 80 - protocol: "tcp" - - name: "forward https to web server" dst: "192.168.1.10" port: 443 protocol: "tcp" - - - name: "forward ssh to internal server" - dst: "192.168.1.20" - port: 2222 - protocol: "tcp" ```