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. Click System | Administration | Saved Scripts. The Script Template page appears.

  3. Click Create to add a new script. The Add Script Template screen appears.

  4. Enter the 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. Click Submit. The script is saved and added to the table.