Friday, October 23, 2026

[powershell][Windows] Detect the status of a remote Transport-layer port by Powershell

 PS C:\Users\XXXX> Test-NetConnection 142.251.156.119 -Port 443



ComputerName     : 142.251.156.119

RemoteAddress    : 142.251.156.119

RemotePort       : 443

InterfaceAlias   : Ethernet

SourceAddress    : YY.YY.YY.YY

TcpTestSucceeded : True




PS C:\Users\XXXX> Test-NetConnection 142.251.156.119 -Port 440

WARNING: TCP connect to (142.251.156.119 : 440) failed



ComputerName           : 142.251.156.119

RemoteAddress          : 142.251.156.119

RemotePort             : 440

InterfaceAlias         : Ethernet

SourceAddress          : YY.YY.YY.YY

PingSucceeded          : True

PingReplyDetails (RTT) : 4 ms

TcpTestSucceeded       : False

Wednesday, October 7, 2026

[Linux] Show the cause of getting crash in Linux

 #journalctl -k -b -l

[UFW][Firewall] ufw notes on 20261007

Check ufw status:

#ufw status verbose


Enable and Start up ufw:

#ufw enable

#systemctl enable ufw.service


For Internet network adapter prohibiting all inbound traffic besides exception:

#ufw allow out on [interface]

#ufw deny in on [interface]

#ufw allow from [exception ip] on [interface]


Allow all traffic for the other network adapters:

#ufw allow in on [interface]

#ufw allow out on [interface]


How to re-order ufw rules:

#ufw status numbered

#ufw delete [number]

#ufw insert [position] [rule text]


How to review ufw logs:

#tail -n 30 -f /var/log/ufw.log