feat(pillar-4): complete dual-npm keepalived HA cluster on VIP 140.44.4.70
This commit is contained in:
16
scripts/check_port_forwards.py
Normal file
16
scripts/check_port_forwards.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import paramiko
|
||||
|
||||
def main():
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
try:
|
||||
ssh.connect('14.44.4.1', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=5)
|
||||
stdin, stdout, stderr = ssh.exec_command('iptables -t nat -S | grep -E "80|443"')
|
||||
print("IPTABLES NAT:\n", stdout.read().decode())
|
||||
ssh.close()
|
||||
except Exception as e:
|
||||
print("SSH to UDM Pro error:", e)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user