Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions .github/workflows/openclaw-firewall-port-18789.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Custom inverted firewall check for OpenClaw port 18789.
# Port 18789 must stay CLOSED (firewall blocking it).
# Status is UP (green) when port is closed, DOWN (red) when accessible.
# This workflow is NOT auto-generated by Upptime and will not be overwritten.

name: OpenClaw Firewall Port 18789 Check
on:
schedule:
- cron: "15 0 * * *"
workflow_dispatch:

jobs:
check:
name: Check that port 18789 is closed (firewall check)
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT || github.token }}

- name: Check port 18789
id: port-check
run: |
if nc -z -w 5 45.155.169.114 18789 2>/dev/null; then
echo "status=down" >> "$GITHUB_OUTPUT"
echo "Port 18789 is OPEN - the firewall may be down!"
else
echo "status=up" >> "$GITHUB_OUTPUT"
echo "Port 18789 is CLOSED - the firewall is working correctly."
fi

- name: Update history file
run: |
NOW=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")
{
echo "url: tcp://45.155.169.114:18789"
echo "status: ${{ steps.port-check.outputs.status }}"
echo "code: 0"
echo "responseTime: 0"
echo "lastUpdated: ${NOW}"
echo "startTime: 2026-03-14T14:39:37.002Z"
echo "generator: Upptime <https://github.com/upptime/upptime>"
} > history/open-claw-firewall-port-18789.yml

- name: Commit and push if status changed
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add history/open-claw-firewall-port-18789.yml
git diff --staged --quiet || git commit -m \
"${{ steps.port-check.outputs.status == 'up' && '🟩' || '🟥' }} OpenClaw firewall (port 18789) is ${{ steps.port-check.outputs.status }} [skip ci] [upptime]"
git push

- name: Create issue if port is accessible
if: steps.port-check.outputs.status == 'down'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_PAT || github.token }}
script: |
// Ensure the label exists
try {
await github.rest.issues.getLabel({
owner: context.repo.owner,
repo: context.repo.repo,
name: 'open-claw-firewall-port-18789',
});
} catch {
await github.rest.issues.createLabel({
owner: context.repo.owner,
repo: context.repo.repo,
name: 'open-claw-firewall-port-18789',
color: 'd73a4a',
});
}
const { data: issues } = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
labels: 'open-claw-firewall-port-18789',
state: 'open',
});
if (issues.length === 0) {
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: '🚨 OpenClaw port 18789 is accessible — firewall may be down',
body: 'Port 18789 at `45.155.169.114` is reachable from the internet. The firewall rule blocking this port may have been removed or bypassed.',
labels: ['status', 'open-claw-firewall-port-18789'],
});
}

- name: Close issue if port is closed (firewall restored)
if: steps.port-check.outputs.status == 'up'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_PAT || github.token }}
script: |
const { data: issues } = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
labels: 'open-claw-firewall-port-18789',
state: 'open',
});
for (const issue of issues) {
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
state: 'closed',
});
}
2 changes: 0 additions & 2 deletions .upptimerc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ sites:
url: tcp://45.155.169.114:80
- name: OpenClaw firewall (port 443)
url: tcp://45.155.169.114:443
- name: OpenClaw firewall (port 18789)
url: tcp://45.155.169.114:18789

status-website:
cname: ismyserverworki.ng
Expand Down
2 changes: 1 addition & 1 deletion history/open-claw-firewall-port-18789.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
url: tcp://45.155.169.114:18789
status: down
status: up
code: 0
responseTime: 0
lastUpdated: 2026-03-14T14:39:37.004Z
Expand Down