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:
-
Log in to Stellar Cyber.
-
Click System | Administration | Saved Scripts. The Script Template page appears.
-
Click Create to add a new script. The Add Script Template screen appears.
-
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.
-
Choose a Tenant Name. We chose Root Tenant. You cannot edit the tenant after you submit.
-
In the Script Body, enter:
sudo iptables -I INPUT -s {{_source.srcip}} -p tcp -j DROP
-
Click Submit. The script is saved and added to the table.