Creating a Saved Script With One Command Line to Block a Source IP Address

You can create a saved script to block a source IP address using a single line in Stellar Cyber:

  1. Log in to Stellar Cyber.

  2. Select System | Saved Scripts.

    The Script Template page appears.

  3. Select Create to add a new script.

    The Add Script Template screen appears.

  4. Enter a Name.

    Each script must have a unique name. This field does not support multibyte characters. You cannot edit the name after you submit. We entered Block Source IP Address.

  5. Choose a Tenant Name.

    We chose Root Tenant. You cannot edit the tenant after you submit.

  6. In the Script Body, enter:

    sudo iptables -I INPUT -s {{_source.srcip}} -p tcp -j DROP
  7. Submit.

    The script is saved and added to the table.