Skip to main content
Connect open port monitoring
Last update:

Connect open port monitoring

This is an example of connection and basic monitoring configuration for an IP address. All methods for managing the service are described in API documentation.

  1. Add the IP address to the monitoring list:

    curl -X POST \
    -H 'X-Token: <token>' \
    -H 'Content-Type: application/json' \
    -d '{"ip":"<ip_address>"}' \
    https://api.selectel.ru/eye/v1/ips

    Specify:

    • <token> — Selectel token;
    • <ip_address> — The IP address to add to the service.
  2. Wait about 10 minutes while the service performs an initial quick port scan of the IP address on popular ports. If open ports are detected, you will receive an email notification.

  3. If open ports are detected that should be closed, close them. For example, for Linux use the iptables utility or UFW.

  4. Mark the remaining open ports of the IP address as trusted by tagging them with KNOWN meaning true.

    curl -X PUT \
    -H 'X-Token: <token>' \
    -d '{"ip":"<ip_address>"}' \
    https://api.selectel.ru/eye/v1/ips/ports/<port>

    Specify:

    • <ip_address> — The IP address where the port is located;
    • <port> — number of the port to be marked.
  5. Optional: to verify that the tag is set correctly, request a list of all open ports of the IP address and check the value in the field KNOWN:

    curl -X GET \
    -H 'X-Token: <token>' \
    -H 'Content-Type: application/json' \
    -d '{"ip":"<ip_address>"}' \
    https://api.selectel.ru/eye/v1/ips/ports

    Specify <ip_address> — The IP address for which you want to obtain a list of ports.

  6. Wait for the next scan, scans are performed daily at 9:00 and 18:00 (UTC+3). If there is an open port left on the address that is not marked as trusted, you will receive a notification to the email you specified when registering your account. You can also connect notifications in Telegram.