Sign inSign up

zerospam/check-firewall

By zerospam

•Updated over 7 years ago

Image
0

1.2K

zerospam/check-firewall repository overview

⁠Check Firewalled

Mini HTTP service that takes a JSON with server information and check if it's accessible from the application.

In our use-case, we want the tested server to not be accessible from this application.

An unaddressable server is considered a success.

⁠Env

KeyRequirementExplanation
SHARED_KEYmandatorySecret shared between main app and this one. (Needs to be sent in the header Authorization)
APP_PORToptional (default 80)Port used for the application

⁠Data

{
  "server": "example.com",
  "port": 25,
  "mx": false
}
KeyExplanation
serverServer to check
portPort to use to attempt the connection
mxInstead of resolving the IP, resolve the MX of the server first then check IPs

⁠Result

⁠Success
{
    "request": {
        "server": "example.com",
        "port": 25,
        "mx": false
    },
    "success": true,
    "details": [
        {
            "server": "example.com",
            "ip": "0.0.0.0",
            "result": true
        },
        {
            "server": "example.com",
            "ip": "0.0.0.1",
            "result": true
        },
    ]
}
⁠Failure
⁠All servers
{
    "request": {
        "server": "example.com",
        "port": 25,
        "mx": false
    },
    "success": false,
    "details": [
        {
            "server": "example.com",
            "ip": "0.0.0.0",
            "result": false
        },
        {
            "server": "example.com",
            "ip": "0.0.0.1",
            "result": false
        },
    ]
}
⁠One servers
{
    "request": {
        "server": "example.com",
        "port": 25,
        "mx": false
    },
    "success": false,
    "details": [
        {
            "server": "example.com",
            "ip": "0.0.0.0",
            "result": false
        },
        {
            "server": "example.com",
            "ip": "0.0.0.1",
            "result": true
        },
    ]
}

Tag summary

Content type

Image

Digest

Size

3.5 MB

Last updated

over 7 years ago

docker pull zerospam/check-firewall