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.
-
Select System | Saved Scripts.
The Script Template page appears.
-
Select Create to add a new script.
The Add Script Template screen appears.
-
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.
-
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
-
Submit.
The script is saved and added to the table.