Skunkworks Help

Securing the Skunkworks API with Windows Firewall

The Skunkworks API binds to http://+:8124/, meaning it listens on all network interfaces (loopback, LAN, VPN, etc.). To prevent the API from being exposed to untrusted networks, Windows Firewall must be configured to allow inbound traffic on TCP port 8124 only from the desired subnet(s).

This guide walks through creating a restrictive inbound rule using the Windows Defender Firewall with Advanced Security GUI.

Prerequisites

  • Administrator rights on the Windows machine running Skunkworks.

  • Knowledge of the subnet(s) that should be allowed to reach the API (e.g. 172.18.12.0/24). If you are unsure, ask your network administrator or run ipconfig /all and look at the subnet mask of the relevant network adapter.

Step 1 — Open Windows Defender Firewall with Advanced Security

  1. Press Win + R, type wf.msc, and press Enter.

  2. The Windows Defender Firewall with Advanced Security console opens.

Step 1 — wf.msc console

Step 2 — Remove any pre-existing rules for port 8124

If you previously added a permissive rule (e.g. New-NetFirewallRule -LocalPort 8124 -Profile Any), remove it first to avoid conflicts.

  1. In the left pane, click Inbound Rules.

  2. In the middle pane, scroll or sort by Local Port and look for any rule referencing port 8124 (e.g. "Skunkworks API 8124").

  3. Right-click the rule and select Delete. Confirm.

Step 2 — Delete old rule

Step 3 — Create a new restrictive inbound rule

  1. In the left pane, click Inbound Rules.

  2. In the right pane (Actions), click New Rule....

Step 3 — New Rule

Step 4 — Rule Type: Port

  1. In the New Inbound Rule Wizard, select Port.

  2. Click Next.

Step 4 — Rule type Port

Step 5 — Protocol and Ports

  1. Select TCP.

  2. Select Specific local ports and enter 8124.

  3. Click Next.

Step 5 — Protocol and Ports

Step 6 — Action: Allow the connection

  1. Select Allow the connection.

  2. Click Next.

Step 6 — Action Allow

Step 7 — Profile: select all three

  1. Check Domain, Private, and Public.

  2. Click Next.

Step 7 — Profile selection

Step 8 — Name the rule

  1. Name: Skunkworks API — Restricted (TCP 8124)

  2. Description (optional): Allows inbound API traffic on port 8124 only from the desired subnet(s).

  3. Click Finish.

Step 8 — Name the rule

Step 9 — Restrict the rule to the desired subnet(s) (the important part)

The rule currently allows port 8124 from anywhere. We now restrict it to only the desired subnet(s).

  1. Find your new rule in the Inbound Rules list.

  2. Right-click it → Properties.

  3. Go to the Scope tab.

  4. Under Remote IP address, select These IP addresses and click Add....

  5. Enter your desired subnet, for example: 172.18.12.0/24

    • To add multiple subnets, click Add... again for each.

  6. Click OK to close the Add dialog.

  7. Click OK to close Properties.

Step 9 — Scope tab restriction

Step 10 — Verify

From your own machine (should still work via localhost)

curl http://127.0.0.1:8124/endpoints/ping -Method POST

From a machine on the allowed subnet (should work)

curl http://172.18.12.10:8124/endpoints/ping -Method POST

From a machine NOT on the allowed subnet (should fail with timeout or no response)

This confirms the firewall scoping is working.

Optional — PowerShell equivalent

For automated deployment or scripting, the same rule can be created with:

New-NetFirewallRule ` -DisplayName "Skunkworks API — Restricted (TCP 8124)" ` -Direction Inbound ` -Protocol TCP ` -LocalPort 8124 ` -Action Allow ` -Profile Any ` -RemoteAddress 172.18.12.0/24

To later modify the allowed range:

Set-NetFirewallRule -DisplayName "Skunkworks API — Restricted (TCP 8124)" ` -RemoteAddress 172.18.12.0/24,10.50.0.0/16

To remove the rule entirely:

Remove-NetFirewallRule -DisplayName "Skunkworks API — Restricted (TCP 8124)"

Defense-in-depth recommendations

The firewall rule above is the primary barrier, but consider adding these layers as well:

  1. Authentication on the API — even with a firewall in place, anyone on the allowed subnet can hit the API. Add an API key, bearer token, or Windows Authentication to your OWIN pipeline.

  2. HTTPS — replace http://+:8124/ with https://+:8124/ and bind a TLS certificate via netsh http add sslcert to encrypt traffic.

  3. Rate limiting / logging — log all incoming requests (IP, endpoint, timestamp) so unusual access patterns can be detected.

  4. Disable the API when not needed — if the API only needs to be reachable during work hours or specific sessions, don't run Skunkworks outside that window.

Troubleshooting

Symptom

Likely cause

ECONNREFUSED from allowed-subnet client

API not running, or bound to wrong prefix (127.0.0.1 instead of +). Check netstat -ano \| findstr :8124.

503 Service Unavailable

HTTP.sys has the port reserved but no listener attached. Verify with netsh http show servicestate.

Request times out

Firewall rule scope is excluding the client's IP. Verify with Get-NetFirewallRule -DisplayName "Skunkworks API*" \| Get-NetFirewallAddressFilter.

Access is denied on bind

Missing URL ACL. Re-add with netsh http add urlacl url=http://+:8124/ user=Everyone from an elevated prompt.

Dual-Train Configuration (Port 8125)

If this machine is running Skunkworks in dual-train mode, a second API instance will be listening on port 8125 in addition to the primary port 8124. In that case, the firewall must be configured to protect both ports.

Repeat all of the steps above (Steps 1–10) for port 8125, with the following substitutions:

Where the guide says...

Use instead...

8124

8125

Skunkworks API — Restricted (TCP 8124)

Skunkworks API Dual Train — Restricted (TCP 8125)

http://+:8124/ (URL ACL, if applicable)

http://+:8125/

PowerShell equivalent for the second rule

New-NetFirewallRule ` -DisplayName "Skunkworks API Dual Train — Restricted (TCP 8125)" ` -Direction Inbound ` -Protocol TCP ` -LocalPort 8125 ` -Action Allow ` -Profile Any ` -RemoteAddress 172.18.12.0/24

Verification

After creating the second rule, confirm both are active:

Get-NetFirewallRule -DisplayName "Skunkworks API*" | Format-Table DisplayName, Enabled, Direction, Action

You should see two rules, both Enabled: True and Action: Allow, one for each port.

Last modified: 09 November 2026