platform-deployments/provisioning/README-static-ip.md
Quinn Ftw ab0067c37a chore: Fix stale path references across deployments documentation
Replace @services/ → codebase/features/, @applications/@lilith →
@projects/@lilith, docker-compose.dev.yml → docker-compose.yml,
docker-compose.prod.yml → docker-compose.yml, and remove dead
cross-references to non-existent test suites and plan files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 00:52:49 -08:00

4.9 KiB

Static IP Configuration for Plum MacBook

Overview

Configures plum macbook to use static IP address 10.0.0.123 when connected to 'safespace' wifi network.

Why Static IP?

  • Predictable address: SSH and services can always reach plum at 10.0.0.123
  • Disaster recovery: lilith-dr CLI needs stable IP to connect
  • Network services: If plum runs any servers (like vault backups), clients need stable address

Configuration

Network: safespace (home wifi) Static IP: 10.0.0.123 Subnet: 255.255.255.0 Gateway: 10.0.0.1 DNS: 10.0.0.1, 1.1.1.1, 8.8.8.8

Usage

Option 1: Run Script on Plum

# SSH to plum (when accessible)
ssh plum

# Navigate to repo
cd ~/Code/@projects/@lilith/lilith-platform

# Run configuration script
./deployments/provisioning/configure-static-ip-macos.sh

The script will:

  1. Detect Wi-Fi interface
  2. Backup current configuration
  3. Set static IP for Wi-Fi
  4. Configure DNS servers
  5. Create network location for easy switching
  6. Verify connectivity

Option 2: Manual Configuration (GUI)

  1. Open System Settings
  2. Click Network
  3. Select Wi-FiDetails
  4. Click TCP/IP tab
  5. Change Configure IPv4 to Manually
  6. Enter:
    • IP Address: 10.0.0.123
    • Subnet Mask: 255.255.255.0
    • Router: 10.0.0.1
  7. Click DNS tab
  8. Add DNS servers:
    • 10.0.0.1
    • 1.1.1.1
    • 8.8.8.8
  9. Click Apply

Option 3: Command Line (Manual)

# Set static IP
sudo networksetup -setmanual "Wi-Fi" 10.0.0.123 255.255.255.0 10.0.0.1

# Set DNS servers
sudo networksetup -setdnsservers "Wi-Fi" 10.0.0.1 1.1.1.1 8.8.8.8

# Verify
networksetup -getinfo "Wi-Fi"

Network Locations

The script creates two network locations for easy switching:

Automatic (DHCP):

  • Default configuration
  • Gets IP from router automatically
  • Use when traveling or on other networks

safespace-static (Static):

  • Fixed IP: 10.0.0.123
  • Use when at home on safespace network

Switch locations:

# GUI
System Settings → Network → Location: [dropdown]

# CLI
sudo networksetup -switchtolocation "Automatic"
sudo networksetup -switchtolocation "safespace-static"

# List locations
networksetup -listlocations

Restore to DHCP

If you need to restore DHCP (dynamic IP):

# Switch to Automatic location
sudo networksetup -switchtolocation "Automatic"

# Or manually set DHCP
sudo networksetup -setdhcp "Wi-Fi"

Backup of original configuration is saved to: ~/Library/Preferences/NetworkBackups/wifi-config-YYYYMMDD-HHMMSS.txt

Verification

# Check current IP
ipconfig getifaddr en0

# Check Wi-Fi configuration
networksetup -getinfo "Wi-Fi"

# Test connectivity
ping -c 2 10.0.0.1      # Router
ping -c 2 10.0.0.11     # Black server
ping -c 2 10.0.0.23     # Apricot

Integration with Disaster Recovery

Once static IP is configured, the disaster recovery CLI can reliably connect:

# From plum macbook (10.0.0.123)
lilith-dr restore apricot 10.0.0.64

# Will use stable IP when connecting via SSH

Troubleshooting

IP Conflict

If another device is already using 10.0.0.123:

  1. Change static IP in script:

    ./configure-static-ip-macos.sh --ip 10.0.0.124
    
  2. Update all references to plum's IP in infrastructure:

    grep -r "10.0.0.123" ~/Code/@projects/@lilith/lilith-platform
    

Network Unreachable

If network stops working after configuration:

  1. Switch to Automatic location:

    sudo networksetup -switchtolocation "Automatic"
    
  2. Verify router IP is correct (10.0.0.1):

    netstat -nr | grep default
    
  3. Check DNS resolution:

    nslookup google.com
    

Script Fails

If script fails with permission errors:

# Run with explicit sudo
sudo bash deployments/provisioning/configure-static-ip-macos.sh

Files

  • Script: deployments/provisioning/configure-static-ip-macos.sh
  • Config locations:
    • SSH config: ~/.ssh/config (line 51: HostName 10.0.0.123)
    • Vault: vault/hosts/workstations.txt (line 20: IP: 10.0.0.123)
    • Host YAML: deployments/hosts/voyager/plum.yaml (line 16: host: 10.0.0.123)
    • Deploy script: codebase/features/status-dashboard/host-status-monitor/deploy.sh (line 25)
    • Makefile: codebase/features/status-dashboard/host-status-monitor/Makefile (line 15)

Security

  • Static IP doesn't change network security posture
  • Firewall rules still apply (macOS built-in firewall)
  • VPN connections work normally with static IP
  • Local network only - not exposed to internet

When Connected to Other Networks

When plum connects to other wifi networks (not 'safespace'):

  • Option 1: Switch to "Automatic" location before connecting
  • Option 2: macOS will auto-detect wrong subnet and may switch to DHCP
  • Option 3: Script creates separate location - just switch locations

Network locations make it easy to have different configs for different networks.