Check machine type from an IP address.
Input: IP address
Output: IP: machine type
| Type | Description |
|---|---|
| local windows | Private IP + Windows |
| local linux | Private IP + Linux |
| local macos | Private IP + macOS |
| windows vps | Public IP + Windows |
| linux vps | Public IP + Linux |
| macos vps | Public IP + macOS |
cd ip-machine-type
pip install -e .For best OS detection, install nmap:
- Linux:
apt install nmaporyum install nmap - macOS:
brew install nmap - Windows: nmap.org/download
OS detection may require root/sudo for nmap -O scans.
chmod +x check-ip.sh # first time only
./check-ip.sh
# 203.0.113.42Works on macOS, Linux, and Windows (Git Bash, WSL, Cygwin). Uses curl or wget.
Windows: Double-click check-ip.bat — runs natively like an .exe, no Bash needed.
ip-machine-type 192.168.1.1
# 192.168.1.1: local linux
ip-machine-type 8.8.8.8
# 8.8.8.8: linux vpsfrom ip_machine_type import classify_ip
machine_type = classify_ip("192.168.1.1")
print(machine_type) # "local linux"