TCP-Port testen

Prüft, ob ein beliebiger TCP-Port auf einem Host erreichbar ist.

HTTPS (443)

PowerShell (Windows)

Test-NetConnection Bordmittel

Test-NetConnection -ComputerName mail.example.com -Port 443 -InformationLevel Detailed

nc / ncat Zusatztool

ncat -vz mail.example.com 443

Unix-Shell (bash)

bash /dev/tcp Bordmittel

timeout 5 bash -c "</dev/tcp/mail.example.com/443" && echo open || echo closed

nc Zusatztool

nc -vz mail.example.com 443

SMTP (25)

PowerShell (Windows)

Test-NetConnection Bordmittel

Test-NetConnection -ComputerName mail.example.com -Port 25 -InformationLevel Detailed

nc / ncat Zusatztool

ncat -vz mail.example.com 25

Unix-Shell (bash)

bash /dev/tcp Bordmittel

timeout 5 bash -c "</dev/tcp/mail.example.com/25" && echo open || echo closed

nc Zusatztool

nc -vz mail.example.com 25

LDAPS (636)

PowerShell (Windows)

Test-NetConnection Bordmittel

Test-NetConnection -ComputerName dc01.example.com -Port 636 -InformationLevel Detailed

nc / ncat Zusatztool

ncat -vz dc01.example.com 636

Unix-Shell (bash)

bash /dev/tcp Bordmittel

timeout 5 bash -c "</dev/tcp/dc01.example.com/636" && echo open || echo closed

nc Zusatztool

nc -vz dc01.example.com 636

Ping

Prüft die grundsätzliche Erreichbarkeit eines Hosts per ICMP.

PowerShell (Windows)

Test-Connection Bordmittel

Test-Connection -TargetName mail.example.com -Count 4

ping Bordmittel

ping -n 4 mail.example.com

Unix-Shell (bash)

ping Bordmittel

ping -c 4 mail.example.com

fping Zusatztool

fping -c 4 mail.example.com

Traceroute

Zeigt den Netzwerkpfad zu einem Host Hop für Hop.

PowerShell (Windows)

Test-NetConnection Bordmittel

Test-NetConnection -ComputerName mail.example.com -TraceRoute

tracert Bordmittel

tracert -d mail.example.com

Unix-Shell (bash)

tracepath Bordmittel

tracepath mail.example.com

traceroute / mtr Zusatztool

traceroute mail.example.com
mtr -rw -c 10 mail.example.com

traceroute ist auf schlanken Linux-Servern nicht immer installiert. mtr liefert eine laufend aktualisierte Ansicht.

Wer lauscht auf Port?

Zeigt, welcher Prozess lokal auf einem Port lauscht.

SMTP (25)

PowerShell (Windows)

Get-NetTCPConnection Bordmittel

Get-NetTCPConnection -State Listen -LocalPort 25 | Select-Object LocalAddress, LocalPort, OwningProcess
Get-Process -Id (Get-NetTCPConnection -State Listen -LocalPort 25).OwningProcess

netstat Bordmittel

netstat -ano | findstr ":25 "

Unix-Shell (bash)

ss Bordmittel

ss -tlnp "sport = :25"

lsof / netstat Zusatztool

lsof -iTCP:25 -sTCP:LISTEN
netstat -tlnp | grep ":25 "

Submission (587)

PowerShell (Windows)

Get-NetTCPConnection Bordmittel

Get-NetTCPConnection -State Listen -LocalPort 587 | Select-Object LocalAddress, LocalPort, OwningProcess
Get-Process -Id (Get-NetTCPConnection -State Listen -LocalPort 587).OwningProcess

netstat Bordmittel

netstat -ano | findstr ":587 "

Unix-Shell (bash)

ss Bordmittel

ss -tlnp "sport = :587"

lsof / netstat Zusatztool

lsof -iTCP:587 -sTCP:LISTEN
netstat -tlnp | grep ":587 "

Welcher DNS-Server?

Zeigt, welche DNS-Server das System aktuell verwendet: wichtig bei Split-DNS.

PowerShell (Windows)

Get-DnsClientServerAddress Bordmittel

Get-DnsClientServerAddress -AddressFamily IPv4 | Select-Object InterfaceAlias, ServerAddresses

ipconfig Bordmittel

ipconfig /all

Unix-Shell (bash)

resolvectl Bordmittel

resolvectl status

cat Bordmittel

cat /etc/resolv.conf

Weitere Bereiche