CIRCUITO
CARIOCA TI · DOCUMENTATION
♙
VPN moderna baseada em peers

WireGuard

Chaves, AllowedIPs, roteamento, NAT/CGNAT, RouterOS e diagnóstico.

security://wireguard
$ scope: VPN moderna baseada em peers
$ method: evidence-first
$ change: validate → apply → verify
$ status: production-oriented_
00 · Method

How to use this guide

This page preserves the same technical scope as the Portuguese edition and follows a validate-before-change workflow. Test sensitive procedures in a lab and keep rollback evidence.

01 · Technical scope

Modelo

WireGuard associa peers a chaves públicas e AllowedIPs. Não existe negociação de usuário/senha; distribuição e rotação de chaves fazem parte da operação.

02 · Technical scope

AllowedIPs

AllowedIPs atua tanto na seleção de rotas quanto na aceitação de origem por peer. Sobreposição mal planejada é causa frequente de tráfego indo ao peer errado.

03 · Technical scope

Implementação

Gere chaves com permissões restritas, configure interface, endereço, ListenPort e peers. Em Linux, wg-quick simplifica, mas entender ip route e wg é indispensável.

04 · Technical scope

CGNAT

Peer atrás de NAT/CGNAT normalmente inicia a sessão e pode usar PersistentKeepalive quando necessário. Não trate keepalive como requisito universal.

05 · Technical scope

Validação

Use wg show para handshake/transfer, ip route get para roteamento, tcpdump para UDP e teste bidirecional. Handshake recente sem tráfego útil costuma apontar para rota/firewall/AllowedIPs.

06 · Technical scope

MikroTik

Em RouterOS, valide interface, peer, allowed-address, rotas e firewall separadamente. Não misture problemas de túnel com política de encaminhamento.

99 · References

Primary technical sources

Editorial review

Final deep PT/EN equivalence review remains scheduled for the Systems close-out audit.