Hi all
I need to create a script sh to connect and block an ip from command line.
Is it possible to do this?
Can you help me with an example?
thanks
Ottavio
This thread was automatically locked due to age.
Hi all
I need to create a script sh to connect and block an ip from command line.
Is it possible to do this?
Can you help me with an example?
thanks
Ottavio
Hello Ottavio Gentile,
Currently there is no easy quick command to block a specific ip !!
If you want to block IP either you can create a custom rule: https://docs.sophos.com/nsg/sophos-firewall/19.0/Help/en-us/webhelp/onlinehelp/AdministratorHelp/RulesAndPolicies/FirewallRules/FirewallRuleAdd/index.html
You can select the action as blocked, mention the IPs you want to block and save it.
You can also use a country blocking rule to block certain range: https://docs.sophos.com/nsg/sophos-firewall/19.0/Help/en-us/webhelp/onlinehelp/AdministratorHelp/RulesAndPolicies/FirewallRules/FirewallRulesCountryBasedRuleCreate/index.html
There is no cli-command.
You have to use the API : https://docs.sophos.com/nsg/sophos-firewall/18.5/Help/en-us/webhelp/onlinehelp/AdministratorHelp/BackupAndFirmware/API/APIUsingAPI/index.html#allow-api-access
https://community.sophos.com/sophos-xg-firewall/f/discussions/134849/edit-rule-with-api
https://community.sophos.com/sophos-xg-firewall/f/discussions/129718/edit-firewall-rule-with-api