vault backup: 2025-07-03 11:22:02

This commit is contained in:
Miguel 2025-07-03 11:22:03 +02:00
parent e16672c662
commit fea7ac8281
4 changed files with 265 additions and 104 deletions

View File

@ -1,9 +1,6 @@
{
"version": "2.0",
"layout": [
null,
null,
null,
null
],
"settings": {

View File

@ -1,9 +1,45 @@
{
"recentFiles": [
{
"basename": "Especifica General",
"path": "03-VM/44 - 98050 - Fiera/Especifica/Especifica General.md"
},
{
"basename": "Layout - Anello-Ring",
"path": "03-VM/44 - 98050 - Fiera/Especifica/Layout - Anello-Ring.md"
},
{
"basename": "Motor_Framework_Insight",
"path": "03-VM/44 - 98050 - Fiera/Especifica/Motor_Framework_Insight.md"
},
{
"basename": "MIGRATION OF AUTOMATION FROM SOFTPLC TWINCAT TO SIEMENS PHYSICAL PLC (Tia Portal)",
"path": "04-SIDEL/13 - E5.007560 - Modifica O&U - SAE235/MIGRATION OF AUTOMATION FROM SOFTPLC TWINCAT TO SIEMENS PHYSICAL PLC (Tia Portal).md"
},
{
"basename": "Como usar PublicApiGenerator - Nuget - Documentator",
"path": "07 - Desarrolo de Proyectos - Scripts - Visual Studio/Proyectos Visual Studio/Como usar PublicApiGenerator - Nuget - Documentator.md"
},
{
"basename": "Notas para crear nuevas aplicaciones",
"path": "07 - Desarrolo de Proyectos - Scripts - Visual Studio/Proyectos Visual Studio/Notas para crear nuevas aplicaciones.md"
},
{
"basename": "Backups - Mikrotik",
"path": "01-Documentation/Routers/Mikrotik - Network Redes/Backups - Mikrotik.md"
},
{
"basename": "MCP",
"path": "01-Documentation/AI - IA - LLM - Artificial Intelligence/MCP.md"
},
{
"basename": "Zerotier VPN con VPS en Buenos Aires",
"path": "01-Documentation/Routers/Mikrotik - Network Redes/Zerotier VPN con VPS en Buenos Aires.md"
},
{
"basename": "Mikrotik - Zerotier - zero_work network",
"path": "01-Documentation/Routers/Mikrotik - Network Redes/Mikrotik - Zerotier - zero_work network.md"
},
{
"basename": "Resumo geral",
"path": "TEMP/Resumo geral.md"
@ -12,18 +48,6 @@
"basename": "AI Prompts useful",
"path": "01-Documentation/AI - IA - LLM - Artificial Intelligence/AI Prompts useful.md"
},
{
"basename": "Notas para crear nuevas aplicaciones",
"path": "07 - Desarrolo de Proyectos - Scripts - Visual Studio/Proyectos Visual Studio/Notas para crear nuevas aplicaciones.md"
},
{
"basename": "Como usar PublicApiGenerator - Nuget - Documentator",
"path": "07 - Desarrolo de Proyectos - Scripts - Visual Studio/Proyectos Visual Studio/Como usar PublicApiGenerator - Nuget - Documentator.md"
},
{
"basename": "MIGRATION OF AUTOMATION FROM SOFTPLC TWINCAT TO SIEMENS PHYSICAL PLC (Tia Portal)",
"path": "04-SIDEL/13 - E5.007560 - Modifica O&U - SAE235/MIGRATION OF AUTOMATION FROM SOFTPLC TWINCAT TO SIEMENS PHYSICAL PLC (Tia Portal).md"
},
{
"basename": "Shortcuts",
"path": "DB/Shortcuts/Shortcuts.md"
@ -80,18 +104,10 @@
"basename": "98050_Hardware PEW - PAW",
"path": "03-VM/44 - 98050 - Fiera/Especifica/98050_Hardware PEW - PAW.md"
},
{
"basename": "Especifica General",
"path": "03-VM/44 - 98050 - Fiera/Especifica/Especifica General.md"
},
{
"basename": "SIDEL - Passwords",
"path": "01-Documentation/SIDEL/SIDEL - Passwords.md"
},
{
"basename": "Layout - Anello-Ring",
"path": "03-VM/44 - 98050 - Fiera/Especifica/Layout - Anello-Ring.md"
},
{
"basename": "Drawing 2025-06-21 12.09.15.excalidraw",
"path": "TEMP/Drawing 2025-06-21 12.09.15.excalidraw.md"
@ -183,22 +199,6 @@
{
"basename": "Excel - VBA - AdjustOffset",
"path": "01-Documentation/Scripts Excel - VBA/Excel - VBA - AdjustOffset.md"
},
{
"basename": "ADAM 4021 - 485 to 4..20ma - Commissioning & Firmware update",
"path": "01-Documentation/Dispositivos - Manuales/ADAM/ADAM 4021 - 485 to 4..20ma - Commissioning & Firmware update.md"
},
{
"basename": "Notes for Windows - Chris Titus Tool - Online - Offline",
"path": "01-Documentation/Windows/Notes for Windows - Chris Titus Tool - Online - Offline.md"
},
{
"basename": "Problem with drag&drop or Left Click",
"path": "01-Documentation/Dispositivos - Manuales/Mouse/Problem with drag&drop or Left Click.md"
},
{
"basename": "GEO - Master UP",
"path": "01-Documentation/Vetromeccanica/GEO - Master UP/GEO - Master UP.md"
}
],
"omittedPaths": [],

View File

@ -4,71 +4,25 @@
"type": "split",
"children": [
{
"id": "8d35ee3dbc1e7652",
"id": "b2d4b0c89914a534",
"type": "tabs",
"children": [
{
"id": "e149ba8053d0496f",
"id": "cc1f4181c7f7c260",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "04-SIDEL/13 - E5.007560 - Modifica O&U - SAE235/MIGRATION OF AUTOMATION FROM SOFTPLC TWINCAT TO SIEMENS PHYSICAL PLC (Tia Portal).md",
"file": "03-VM/44 - 98050 - Fiera/Especifica/Especifica General.md",
"mode": "source",
"source": false,
"backlinks": false
},
"icon": "lucide-file",
"title": "MIGRATION OF AUTOMATION FROM SOFTPLC TWINCAT TO SIEMENS PHYSICAL PLC (Tia Portal)"
}
},
{
"id": "784bec1677ceb702",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "07 - Desarrolo de Proyectos - Scripts - Visual Studio/Proyectos Visual Studio/Como usar PublicApiGenerator - Nuget - Documentator.md",
"mode": "source",
"source": false,
"backlinks": false
},
"icon": "lucide-file",
"title": "Como usar PublicApiGenerator - Nuget - Documentator"
}
},
{
"id": "7ddf69168a3268f7",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "07 - Desarrolo de Proyectos - Scripts - Visual Studio/Proyectos Visual Studio/Notas para crear nuevas aplicaciones.md",
"mode": "source",
"source": false,
"backlinks": false
},
"icon": "lucide-file",
"title": "Notas para crear nuevas aplicaciones"
}
},
{
"id": "7508e43261571080",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "01-Documentation/AI - IA - LLM - Artificial Intelligence/MCP.md",
"mode": "source",
"source": false,
"backlinks": false
},
"icon": "lucide-file",
"title": "MCP"
"title": "Especifica General"
}
}
],
"currentTab": 3
]
}
],
"direction": "vertical"
@ -234,12 +188,11 @@
}
}
],
"currentTab": 4
"currentTab": 5
}
],
"direction": "horizontal",
"width": 369.5,
"collapsed": true
"width": 369.5
},
"left-ribbon": {
"hiddenItems": {
@ -263,14 +216,19 @@
"obsidian-importer:Open Importer": false
}
},
"active": "7508e43261571080",
"active": "cc1f4181c7f7c260",
"lastOpenFiles": [
"TEMP/Resumo geral.md",
"01-Documentation/AI - IA - LLM - Artificial Intelligence/MCP.md",
"01-Documentation/AI - IA - LLM - Artificial Intelligence/AI Prompts useful.md",
"07 - Desarrolo de Proyectos - Scripts - Visual Studio/Proyectos Visual Studio/Notas para crear nuevas aplicaciones.md",
"07 - Desarrolo de Proyectos - Scripts - Visual Studio/Proyectos Visual Studio/Como usar PublicApiGenerator - Nuget - Documentator.md",
"03-VM/44 - 98050 - Fiera/Especifica/Layout - Anello-Ring.md",
"03-VM/44 - 98050 - Fiera/Especifica/Motor_Framework_Insight.md",
"04-SIDEL/13 - E5.007560 - Modifica O&U - SAE235/MIGRATION OF AUTOMATION FROM SOFTPLC TWINCAT TO SIEMENS PHYSICAL PLC (Tia Portal).md",
"07 - Desarrolo de Proyectos - Scripts - Visual Studio/Proyectos Visual Studio/Como usar PublicApiGenerator - Nuget - Documentator.md",
"07 - Desarrolo de Proyectos - Scripts - Visual Studio/Proyectos Visual Studio/Notas para crear nuevas aplicaciones.md",
"01-Documentation/Routers/Mikrotik - Network Redes/Backups - Mikrotik.md",
"01-Documentation/AI - IA - LLM - Artificial Intelligence/MCP.md",
"01-Documentation/Routers/Mikrotik - Network Redes/Zerotier VPN con VPS en Buenos Aires.md",
"01-Documentation/Routers/Mikrotik - Network Redes/Mikrotik - Zerotier - zero_work network.md",
"TEMP/Resumo geral.md",
"01-Documentation/AI - IA - LLM - Artificial Intelligence/AI Prompts useful.md",
"DB/Shortcuts/Shortcuts.md",
"03-VM/44 - 98050 - Fiera/Especifica/AccumulationTable - It.md",
"07 - Desarrolo de Proyectos - Scripts - Visual Studio/Proyectos Visual Studio/Aplicaciones y Librerias.md",
@ -287,12 +245,7 @@
"03-VM/44 - 98050 - Fiera/Especifica/98050_Hardware PEW - PAW.md",
"03-VM/44 - 98050 - Fiera/Especifica/Especifica General.md",
"01-Documentation/SIDEL/SIDEL - Passwords.md",
"03-VM/44 - 98050 - Fiera/Especifica/Layout - Anello-Ring.md",
"TEMP/Drawing 2025-06-21 12.09.15.excalidraw.md",
"04-SIDEL/00 - MASTER/MIXER/IO/Master_Tags Explained.md",
"TEMP",
"04-SIDEL/00 - MASTER/MIXER/IO/SIDEL - Mixer - Master - IO Tags.md",
"04-SIDEL/00 - MASTER/MIXER/IO/Default IO for Analog.md",
"04-SIDEL/13 - E5.007560 - Modifica O&U - SAE235/adjuntos/Pasted image 20250619173806.png",
"04-SIDEL/13 - E5.007560 - Modifica O&U - SAE235/adjuntos/Pasted image 20250619165534.png",
"04-SIDEL/13 - E5.007560 - Modifica O&U - SAE235/adjuntos",

View File

@ -0,0 +1,211 @@
# Guía Completa: Configurar VPN con ZeroTier en VPS Ubuntu 22.04
## Paso 1: Preparación Inicial del VPS
### 1.1 Crear Usuario (Opcional pero Recomendado)
```bash
# Si estás usando root, crear usuario regular
adduser zero # (o el nombre que prefieras)
usermod -aG sudo zero
mkdir -p /home/zero/.ssh
cp /root/.ssh/authorized_keys /home/zero/.ssh/
chown -R zero:zero /home/zero/.ssh
chmod 700 /home/zero/.ssh
chmod 600 /home/zero/.ssh/authorized_keys
# Cambiar al nuevo usuario
su - zero
```
### 1.2 Actualizar Sistema
```bash
sudo apt update && sudo apt upgrade -y
```
### 1.3 Instalar Herramientas Necesarias
```bash
sudo apt install iptables iptables-persistent curl -y
```
## Paso 2: Instalación y Configuración de ZeroTier
### 2.1 Instalar ZeroTier
```bash
# Instalar ZeroTier
curl -s https://install.zerotier.com | sudo bash
# Verificar instalación
sudo zerotier-cli info
```
### 2.2 Unirse a la Red ZeroTier
```bash
# Reemplazar NETWORK_ID con tu ID real
sudo zerotier-cli join b6079f73c60af212
# Verificar estado
sudo zerotier-cli listnetworks
```
### 2.3 Autorizar en ZeroTier Central
1. Ir a **my.zerotier.com**
2. Entrar a tu red
3. En "Members", marcar **"Auth"** para el VPS
4. Asignar nombre descriptivo: "VPS-Buenos-Aires"
## Paso 3: Configurar VPS como Gateway VPN
### 3.1 Identificar Interfaces de Red
```bash
# Ver todas las interfaces
ip addr show
# Identificar:
# - Interfaz ZeroTier: ztyxazlaou (ejemplo)
# - Interfaz pública: eth1 (en este caso)
# - IP ZeroTier asignada: 172.25.177.175 (ejemplo)
```
### 3.2 Habilitar IP Forwarding
```bash
# Verificar estado actual
cat /proc/sys/net/ipv4/ip_forward
# Habilitar permanentemente
echo 'net.ipv4.ip_forward=1' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
```
### 3.3 Configurar Reglas de iptables
```bash
# IMPORTANTE: Usar la interfaz pública correcta (eth1 en nuestro caso)
sudo iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
sudo iptables -A FORWARD -i ztyxazlaou -o eth1 -j ACCEPT
sudo iptables -A FORWARD -i eth1 -o ztyxazlaou -m state --state RELATED,ESTABLISHED -j ACCEPT
# Guardar reglas permanentemente
sudo netfilter-persistent save
```
## Paso 4: Configurar Rutas en ZeroTier Central
### 4.1 Configuración en my.zerotier.com
1. Ir a **my.zerotier.com**
2. Seleccionar tu red "Casa Parma"
3. Ir a sección **"Advanced"**
4. En **"Managed Routes"** agregar:
- **Destination**: `0.0.0.0/0`
- **Via**: `172.25.177.175` (IP ZeroTier del VPS)
5. Guardar cambios
## Paso 5: Configuración de Clientes
### 5.1 En PC Windows
```cmd
# Agregar ruta temporal (se pierde al reiniciar)
route add 0.0.0.0 mask 0.0.0.0 172.25.177.175 metric 1
# Para hacerlo permanente
route -p add 0.0.0.0 mask 0.0.0.0 172.25.177.175 metric 1
```
### 5.2 En Router MikroTik
```bash
/ip route add dst-address=0.0.0.0/0 gateway=172.25.177.175 distance=1
```
### 5.3 En Linux/Mac
```bash
# Temporal
sudo route add default gw 172.25.177.175
# Permanente (varía según distribución)
```
## Paso 6: Verificación y Pruebas
### 6.1 Verificar en el VPS
```bash
# Estado de ZeroTier
sudo zerotier-cli listnetworks
# Ver tráfico pasando
sudo tcpdump -i ztyxazlaou
# Verificar reglas iptables
sudo iptables -t nat -L
sudo iptables -L FORWARD
```
### 6.2 Probar desde Cliente
```bash
# Verificar conectividad al VPS
ping 172.25.177.175
# Verificar IP pública (debe mostrar IP del VPS)
curl ifconfig.me
# Debe devolver: 154.205.154.182 (IP pública del VPS)
```
## Paso 7: Solución de Problemas Comunes
### 7.1 Error de Hostname en sudo
```bash
# Editar hosts
sudo nano /etc/hosts
# Agregar: 127.0.0.1 nombre_del_host localhost
```
### 7.2 ZeroTier no conecta
```bash
# Reiniciar servicio
sudo systemctl restart zerotier-one
sudo systemctl status zerotier-one
```
### 7.3 Verificar Firewall
```bash
# Ubuntu con ufw
sudo ufw status
sudo ufw allow 9993/udp # Puerto ZeroTier
```
## Datos de tu Configuración Específica
- **Network ID**: `b6079f73c60af212`
- **Nombre de Red**: Casa Parma
- **IP VPS ZeroTier**: `172.25.177.175`
- **Interfaz ZeroTier**: `ztyxazlaou`
- **IP Pública VPS**: `154.205.154.182`
- **Interfaz Pública**: `eth1`
```bash
/ip firewall address-list add address=192.168.88.0/24 list=local-networks
/ip firewall address-list add address=192.168.1.0/24 list=local-networks
/ip firewall address-list add address=172.25.0.0/16 list=local-networks
/ip route add dst-address=0.0.0.0/0 gateway=172.25.177.175 routing-mark=via-vpn distance=1 comment="VPN-Smart-Route" disabled=yes
/ip firewall mangle add chain=prerouting src-address=192.168.88.0/24 dst-address-list=!local-networks action=mark-routing new-routing-mark=via-vpn comment="VPN-Public-Only" disabled=yes
```