feat: add diagnostic and traffic policy management scripts for DNS and Pi-hole

This commit is contained in:
2026-11-07 12:42:31 -05:00
parent d4b367794c
commit ffc9ab8ab0
6 changed files with 157 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import paramiko
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect("140.44.4.11", username="root", key_filename=r"C:\Users\Snarf\.ssh\id_ed25519_snarfnet", timeout=10)
cmd = 'k3s kubectl patch svc -n dns pihole-dns-vip --type=merge -p "{\\"spec\\":{\\"externalTrafficPolicy\\":\\"Local\\"}}"'
stdin, stdout, stderr = client.exec_command(cmd)
print("Patch Aerodrome:")
print(stdout.read().decode())
print(stderr.read().decode())
client.close()