[RFC-ADN-01] Normalizar nomenclatura de proyectos
- Directorios: PascalCase (p2601_dasuten → P2601_Dasuten) - Planes: numeración pura (P2601_6.1.A → P2601.06.01) - Sin caracteres especiales en nombres de archivo - 07_proyectos.md: convención RFC-ADN-01 integrada, P2604/P2605 agregados - evento:listar: nueva opción --detalle para descripciones completas
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# Script para configurar proxy SOCKS5 via SSH en dc-dasuten
|
||||
# Ejecutar en dc-dasuten via PowerShell/CMD
|
||||
|
||||
# Configurar el proxy del sistema para usar el tunnel SSH
|
||||
$proxyServer = "127.0.0.1:1080"
|
||||
|
||||
# Configurar proxy WinHTTP
|
||||
netsh winhttp set proxy $proxyServer
|
||||
|
||||
# Configurar proxy para Internet Explorer / sistema
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyEnable -Value 1
|
||||
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyServer -Value $proxyServer
|
||||
|
||||
# Para PowerShell (si es necesario)
|
||||
[System.Net.WebRequest]::DefaultWebProxy = [System.Net.WebRequest]::GetSystemWebProxy()
|
||||
|
||||
Write-Host "Proxy configurado: $proxyServer"
|
||||
Write-Host "Ahora el tráfico de Windows irá a través del tunnel SSH"
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# Script para configurar sudo sin contraseña en srv-dasu
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
CANDADOS="$SCRIPT_DIR/../../adn/tools/seguridad/candados.rb"
|
||||
|
||||
# Cargar credenciales root
|
||||
eval "$($CANDADOS load srv-dasu:root)"
|
||||
|
||||
# Verificar conexión y configurar sudo
|
||||
sshpass -p "$SRV_DASU_ROOT_PASS" ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 rmonla@$1 "
|
||||
echo 'rmonla ALL=(ALL) NOPASSWD:ALL' | sudo tee /etc/sudoers.d/rmonla > /dev/null
|
||||
sudo chmod 440 /etc/sudoers.d/rmonla
|
||||
sudo -n whoami
|
||||
"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✓ sudo sin contraseña configurado exitosamente"
|
||||
else
|
||||
echo "✗ Error al configurar sudo"
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
# Script para iniciar tunnel SOCKS5 SSH en dc-dasuten
|
||||
# Ejecutar via Task Scheduler o manualmente
|
||||
|
||||
SERVICE="ssh"
|
||||
TUNNEL_HOST="100.112.46.104"
|
||||
TUNNEL_USER="rmonla"
|
||||
TUNNEL_PORT="1080"
|
||||
|
||||
# Buscar Plink (PuTTY) o usar SSH nativo
|
||||
if [ -f "/c/Windows/System32/plink.exe" ]; then
|
||||
SSH_CMD="/c/Windows/System32/plink.exe"
|
||||
else
|
||||
SSH_CMD="ssh"
|
||||
fi
|
||||
|
||||
# Iniciar tunnel SSH en background
|
||||
echo "Iniciando tunnel SOCKS5 a $TUNNEL_HOST..."
|
||||
$SSH_CMD -D $TUNNEL_PORT -N -f -C $TUNNEL_USER@$TUNNEL_HOST
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Tunnel SOCKS5 iniciado en puerto $TUNNEL_PORT"
|
||||
|
||||
# Configurar proxy del sistema
|
||||
echo "Configurando proxy del sistema..."
|
||||
netsh winhttp set proxy 127.0.0.1:$TUNNEL_PORT
|
||||
|
||||
echo "Proxy configurado. Ahora puede descargar Tailscale."
|
||||
else
|
||||
echo "Error al iniciar tunnel SSH"
|
||||
exit 1
|
||||
fi
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# Script para instalar Tailscale en dc-dasuten via SMB
|
||||
|
||||
echo "===Instalando Tailscale en dc-dasuten==="
|
||||
|
||||
# Cargar credenciales
|
||||
eval $(ruby adn/tools/seguridad/candados.rb load admindasu)
|
||||
|
||||
# Copiar instalador a dc-dasuten via SMB
|
||||
echo "Copiando instalador..."
|
||||
smbclient -U "DASUTEN\\admindasu%$ADMINDASU_PASS" //10.0.100.10/c\$ -c "put /tmp/tailscale-setup.exe tailscale-setup.exe; exit"
|
||||
|
||||
echo "Instalando Tailscale..."
|
||||
# Ejecutar instalador remotamente via psexec o similar
|
||||
echo "Para completar, ejecutar manualmente en dc-dasuten:"
|
||||
echo " C:\\tailscale-setup.exe /S"
|
||||
echo " Start-Process tailscale.exe -ArgumentList up"
|
||||
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# Script para copiar e instalar Tailscale en VMs Windows
|
||||
|
||||
# Cargar credenciales desde candados
|
||||
eval $(ruby /home/rmonla/Documentos/GitHub/dtic-DIIAA/adn/tools/seguridad/candados.rb load admindasu)
|
||||
|
||||
TARGET_VM=$1
|
||||
if [ -z "$TARGET_VM" ]; then
|
||||
echo "Uso: $0 <vm-ip>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Copiando Tailscale a $TARGET_VM..."
|
||||
sshpass -p "$ADMINDASU_PASS" scp -o StrictHostKeyChecking=no -P 7022 /tmp/tailscale-setup.exe "admindasu@${TARGET_VM}:/tmp/"
|
||||
|
||||
echo "Instalando Tailscale en $TARGET_VM..."
|
||||
sshpass -p "$ADMINDASU_PASS" ssh -o StrictHostKeyChecking=no -p 7022 "admindasu@${TARGET_VM}" "powershell -Command \"Start-Process -FilePath 'C:\\tmp\\tailscale-setup.exe' -ArgumentList '/S' -Wait\""
|
||||
|
||||
echo "Configurando Tailscale en $TARGET_VM..."
|
||||
sshpass -p "$ADMINDASU_PASS" ssh -o StrictHostKeyChecking=no -p 7022 "admindasu@${TARGET_VM}" "powershell -Command \"& 'C:\\Program Files\\Tailscale\\tailscale.exe' up --authkey $TAILSCALE_DASUTEN_AUTHKEY\""
|
||||
|
||||
echo "Verificando estado..."
|
||||
sshpass -p "$ADMINDASU_PASS" ssh -o StrictHostKeyChecking=no -p 7022 "admindasu@${TARGET_VM}" "powershell -Command \"& 'C:\\Program Files\\Tailscale\\tailscale.exe' status\""
|
||||
Reference in New Issue
Block a user