Skip to main content

Operating System Firewalls

After configuring your router, you must also configure your operating system's firewall to allow Autonomys Network traffic.

Quick Setup by OS

Windows Firewall Configuration

Run PowerShell as Administrator and execute:

# Space Acres users - only need these two
New-NetFirewallRule -DisplayName "Autonomys Consensus" `
-Direction Inbound -Protocol TCP -LocalPort 30333 -Action Allow
New-NetFirewallRule -DisplayName "Autonomys DSN" `
-Direction Inbound -Protocol TCP -LocalPort 30433 -Action Allow

# CLI Farmers - add this additional port
New-NetFirewallRule -DisplayName "Autonomys Farmer" `
-Direction Inbound -Protocol TCP -LocalPort 30533 -Action Allow

# Verify rules were created successfully
Get-NetFirewallRule -DisplayName "Autonomys*" |
Format-Table DisplayName, Enabled, Direction, Action

# Expected output:
# DisplayName Enabled Direction Action
# ----------- ------- --------- ------
# Autonomys Consensus True Inbound Allow
# Autonomys DSN True Inbound Allow
# Autonomys Farmer True Inbound Allow

Method 2: Windows Defender Firewall GUI

  1. Open Windows Defender Firewall

    • Press Win + R, type wf.msc, press Enter
    • Or: Control Panel → System and Security → Windows Defender Firewall → Advanced Settings
  2. Create Inbound Rules

    • Click "Inbound Rules" in left panel
    • Click "New Rule..." in right panel
  3. Configure Rule (repeat for each port)

    • Rule Type: Select "Port" → Next
    • Protocol and Ports:
      • Select "TCP"
      • Select "Specific local ports"
      • Enter port number (30333, 30433, or 30533) → Next
    • Action: Select "Allow the connection" → Next
    • Profile: Check all three (Domain, Private, Public) → Next
    • Name:
      • Name: "Autonomys Consensus" (for 30333)
      • Description: "Allow Autonomys Network consensus P2P"
      • Finish
  4. Verify Rules

    • Rules should appear in the Inbound Rules list
    • Ensure they show as "Enabled: Yes"

Windows Firewall Troubleshooting

Check if ports are blocked:

# Test if firewall is blocking
Test-NetConnection -ComputerName localhost -Port 30333

# Check which program is using a port
netstat -ano | findstr :30333

# Get process name from PID
Get-Process -Id (Get-NetTCPConnection -LocalPort 30333).OwningProcess

Temporarily disable firewall (for testing only):

# Disable firewall temporarily
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

# Remember to re-enable!
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True

Windows Advanced Security

Add application-specific rules:

# For Space Acres executable
New-NetFirewallRule -DisplayName "Space Acres Application" `
-Direction Inbound `
-Program "C:\Program Files\Space Acres\space-acres.exe" `
-Action Allow

# For CLI node
New-NetFirewallRule -DisplayName "Subspace Node" `
-Direction Inbound `
-Program "C:\subspace\subspace-node.exe" `
-Action Allow

Create outbound rules (usually not needed):

# If outbound is restricted
New-NetFirewallRule -DisplayName "Autonomys Outbound" `
-Direction Outbound -Protocol TCP `
-RemotePort 30333,30433,30533 -Action Allow

Firewall Testing and Verification

Test Port Accessibility

# Check if ports are listening
# Linux/macOS:
sudo netstat -tuln | grep -E "30333|30433|30533"
sudo lsof -i :30333

# Windows PowerShell:
Get-NetTCPConnection -LocalPort 30333,30433,30533

# Test local connectivity
telnet localhost 30333
nc -zv localhost 30333

Monitor Firewall Activity

# UFW logs
sudo tail -f /var/log/ufw.log

# iptables logging
sudo dmesg | grep -i "autonomys"
sudo journalctl -f | grep -i "firewall"

# Connection tracking
sudo conntrack -L | grep -E "30333|30433|30533"

# Watch live connections
watch -n 1 'ss -tuln | grep -E "30333|30433|30533"'

Security Best Practices

Essential Rules

DO:

  • Only open required ports
  • Use specific port numbers (not ranges)
  • Keep firewall enabled always
  • Log suspicious activity
  • Regular security updates

DON'T:

  • Disable firewall for testing (use specific rules)
  • Open all ports (DMZ mode)
  • Expose RPC ports (9944, 9945)
  • Ignore firewall logs
  • Use permissive rules (allow all)

Monitoring Tools

Recommended security tools:

  • fail2ban (Linux) - Automatic IP banning
  • pfBlockerNG (pfSense) - Advanced filtering
  • Little Snitch (macOS) - Application firewall
  • GlassWire (Windows) - Network monitor

Common Issues and Solutions

Issue: Firewall Blocking Despite Rules

Diagnosis:

# Check if application has permission
# Linux: Check SELinux/AppArmor
sestatus
aa-status

# Windows: Check Windows Defender
Get-MpPreference | Select-Object ExclusionPath

# macOS: Check app signature
codesign -v /Applications/Space\ Acres.app

Issue: Multiple Firewalls Conflict

Some systems have multiple firewall layers:

  1. Cloud provider firewall (AWS/Azure/GCP)
  2. OS firewall (UFW/iptables/Windows)
  3. Third-party antivirus firewall
  4. Docker/container firewall

Solution: Configure all layers consistently.

Issue: Firewall Rules Not Persisting

# Make UFW rules persistent
sudo ufw enable

# Save iptables rules
sudo apt install iptables-persistent
sudo netfilter-persistent save

# Check startup services
sudo systemctl enable ufw
sudo systemctl enable netfilter-persistent