MikroTik
How to Configure IP Tunnels on MikroTik: Step by Step
VPS 8GB RAM + 75GB NVMe — R$59/mês4 vCPUs · Tráfego ilimitado · Ubuntu Server LTS · Suporte para instalação incluso
Contratar agoraStep-by-Step Guide to Configuring IP Tunnels on MikroTik
1. Access the MikroTik
- Conecte-se ao roteador via WinBox, SSH, ou interface Web.
2. Check Network Requirements
- Identifique os IPs públicos ou privados que serão usados como ponto de origem e destino do túnel.
- Exemplo:
- IP local:
192.168.1.1 - IP remoto:
203.0.113.1
- IP local:
- Exemplo:
3. Create the IP Tunnel
- Configure o túnel no Mikrotik, especificando o endereço local e remoto:
RouterOS
/interface ipip add name=IP-Tunnel local-address=192.168.1.1 remote-address=203.0.113.1 comment="Túnel IP para rede remota"
4. Assign an IP Address to the Tunnel
- Defina um endereço IP para a interface do túnel:
RouterOS
/ip address add address=10.10.0.1/30 interface=IP-Tunnel
5. Configure Routes for the Tunnel
- Adicione uma rota para permitir que o tráfego destinado à rede remota passe pelo túnel:
RouterOS
/ip route add dst-address=192.168.2.0/24 gateway=10.10.0.2
6. Check the Tunnel Status
- Confirme se o túnel está ativo e funcionando corretamente:
RouterOS
/interface print
7. Configure Additional Security (Optional)
- Se necessário, adicione IPSec para criptografar o tráfego do túnel:
RouterOS
/ip ipsec peer add address=203.0.113.1/32 auth-method=pre-shared-key secret="ChaveSegura123" /ip ipsec policy add src-address=192.168.1.0/24 dst-address=192.168.2.0/24 tunnel=yes action=encrypt proposal=default
8. Test the Connection
- Verify that traffic between the remote and local networks is flowing through the tunnel: ping 192.168.2.1
9. Monitor the Tunnel
- Use ferramentas de monitoramento para acompanhar o desempenho do túnel:
RouterOS
/tool torch interface=IP-Tunnel