Source Port Ignore List There are times when you may expect traffic from a specific port from a specific IP address (such as a scanner). Instead of ignoring the IP address as a whole, you can choose to simply ignore traffic from the expected port. The following endpoints allow you to interact with a Flock's Source Port Ignore List.
TIP
These endpoints will set the Ignore Lists for specified Flocks. For Globally defined Ignore lists, you can take a look at the Console Settings .
Add Source Port to Ignore List POST /api/v1/flock/settings/ignorelist/src_port/ignorelist_src_port
Add a source ip / port to the ignore list.
Show details
Required Parameters auth_token string
A valid auth token
flock_id string
A valid flock_id
Optional Parameters ip string
The source IP to ignore
port int
The source port to ignore
Response A JSON structure with result indicator.
Example curl https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/ignorelist_src_port \
-d auth_token = EXAMPLE_AUTH_TOKEN \
-d flock_id = EXAMPLE_FLOCK_ID \
-d ip = EXAMPLE_IP \
-d port = EXAMPLE_PORT
1 2 3 4 5
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/ignorelist_src_port'
payload = {
'auth_token' : 'EXAMPLE_AUTH_TOKEN' ,
'flock_id' : 'EXAMPLE_FLOCK_ID' ,
'ip' : 'EXAMPLE_IP' ,
'port' : EXAMPLE_PORT
}
r = requests. post( url, data= payload)
print ( r. json( ) )
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{
"result" : "success"
}
1 2 3
Check if Source Port Ignoring is Enabled GET /api/v1/flock/settings/ignorelist/src_port/is_enabled
Check if source port ignoring is enabled for a Flock.
Show details
Required Parameters auth_token string
A valid auth token
flock_id string
A valid flock_id
Response A JSON structure with the enabled state.
Example curl https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/is_enabled \
-d auth_token = EXAMPLE_AUTH_TOKEN \
-d flock_id = EXAMPLE_FLOCK_ID \
-G
1 2 3 4
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/is_enabled'
payload = {
'auth_token' : 'EXAMPLE_AUTH_TOKEN' ,
'flock_id' : 'EXAMPLE_FLOCK_ID'
}
r = requests. get( url, params= payload)
print ( r. json( ) )
1 2 3 4 5 6 7 8 9 10 11 12
{
"is_enabled" : true ,
"result" : "success"
}
1 2 3 4
Check if Source Port Ignoring is Global GET /api/v1/flock/settings/ignorelist/src_port/is_global
Check if source port ignoring is set to Global for a Flock.
Show details
Required Parameters auth_token string
A valid auth token
flock_id string
A valid flock_id
Response A JSON structure with the Global state.
Example curl https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/is_global \
-d auth_token = EXAMPLE_AUTH_TOKEN \
-d flock_id = EXAMPLE_FLOCK_ID \
-G
1 2 3 4
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/is_global'
payload = {
'auth_token' : 'EXAMPLE_AUTH_TOKEN' ,
'flock_id' : 'EXAMPLE_FLOCK_ID'
}
r = requests. get( url, params= payload)
print ( r. json( ) )
1 2 3 4 5 6 7 8 9 10 11 12
{
"is_global" : true ,
"result" : "success"
}
1 2 3 4
Check if Source Port is Ignored GET /api/v1/flock/settings/ignorelist/src_port/is_src_port_ignorelisted
Check if a source port is ignored in a Flock's Ignore List.
Show details
Required Parameters auth_token string
A valid auth token
flock_id string
A valid flock_id
Optional Parameters ip string
The source IP to check
port int
The source port to check
Response A JSON structure with the ignored state.
Example curl https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/is_src_port_ignorelisted \
-d auth_token = EXAMPLE_AUTH_TOKEN \
-d flock_id = EXAMPLE_FLOCK_ID \
-d ip = EXAMPLE_IP \
-d port = EXAMPLE_PORT \
-G
1 2 3 4 5 6
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/is_src_port_ignorelisted'
payload = {
'auth_token' : 'EXAMPLE_AUTH_TOKEN' ,
'flock_id' : 'EXAMPLE_FLOCK_ID' ,
'ip' : 'EXAMPLE_IP' ,
'port' : EXAMPLE_PORT
}
r = requests. get( url, params= payload)
print ( r. json( ) )
1 2 3 4 5 6 7 8 9 10 11 12 13 14
{
"is_ignorelist_enabled" : true ,
"is_ignorelisted" : true ,
"result" : "success"
}
1 2 3 4 5
Disable Source Port Ignore List POST /api/v1/flock/settings/ignorelist/src_port/disable
Disable source port ignoring for a Flock.
Show details
Required Parameters auth_token string
A valid auth token
flock_id string
A valid flock_id
Response A JSON structure with result indicator.
Example curl https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/disable \
-d auth_token = EXAMPLE_AUTH_TOKEN \
-d flock_id = EXAMPLE_FLOCK_ID
1 2 3
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/disable'
payload = {
'auth_token' : 'EXAMPLE_AUTH_TOKEN' ,
'flock_id' : 'EXAMPLE_FLOCK_ID'
}
r = requests. post( url, data= payload)
print ( r. json( ) )
1 2 3 4 5 6 7 8 9 10 11 12
{
"result" : "success"
}
1 2 3
Enable Source Port Ignore List POST /api/v1/flock/settings/ignorelist/src_port/enable
Enable source port ignoring for a Flock.
Show details
Required Parameters auth_token string
A valid auth token
flock_id string
A valid flock_id
Response
Example curl https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/enable \
-d auth_token = EXAMPLE_AUTH_TOKEN \
-d flock_id = EXAMPLE_FLOCK_ID
1 2 3
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/enable'
payload = {
'auth_token' : 'EXAMPLE_AUTH_TOKEN' ,
'flock_id' : 'EXAMPLE_FLOCK_ID'
}
r = requests. post( url, data= payload)
print ( r. json( ) )
1 2 3 4 5 6 7 8 9 10 11 12
{
"result" : "success"
}
1 2 3
Fetch Unsanitized Ignore List GET /api/v1/flock/settings/ignorelist/src_port/string
Fetch the unsanitized ignore list string.
Show details
Required Parameters auth_token string
A valid auth token
flock_id string
A valid flock_id
Response A JSON structure with the unsanitized list.
Example curl https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/string \
-d auth_token = EXAMPLE_AUTH_TOKEN \
-d flock_id = EXAMPLE_FLOCK_ID \
-G
1 2 3 4
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/string'
payload = {
'auth_token' : 'EXAMPLE_AUTH_TOKEN' ,
'flock_id' : 'EXAMPLE_FLOCK_ID'
}
r = requests. get( url, params= payload)
print ( r. json( ) )
1 2 3 4 5 6 7 8 9 10 11 12
{
"ignorelist" : "<ip_address>:<port>\n<ip_address>:<port>" ,
"result" : "success"
}
1 2 3 4
List Ignored Source Ports GET /api/v1/flock/settings/ignorelist/src_port/sanitized
Fetch a sanitized list of ignored source IPs and ports for a Flock.
Show details
Required Parameters auth_token string
A valid auth token
flock_id string
A valid flock_id
Response A JSON structure with the list of ignored IPs and ports.
Example curl https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/sanitized \
-d auth_token = EXAMPLE_AUTH_TOKEN \
-d flock_id = EXAMPLE_FLOCK_ID \
-G
1 2 3 4
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/sanitized'
payload = {
'auth_token' : 'EXAMPLE_AUTH_TOKEN' ,
'flock_id' : 'EXAMPLE_FLOCK_ID'
}
r = requests. get( url, params= payload)
print ( r. json( ) )
1 2 3 4 5 6 7 8 9 10 11 12
{
"ignorelist" : [
{
"<ip_address>" : {
"both" : [
<port>
]
} ,
"<ip_address>" : {
"both" : [
<port>
]
}
} ,
[ ]
] ,
"result" : "success"
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Set Ignored Source Ports POST /api/v1/flock/settings/ignorelist/src_port/save
Set the list of ignored source ports for a Flock.
Show details
Required Parameters auth_token string
A valid auth token
flock_id string
A valid flock_id
Optional Parameters ignorelist string
A newline separated list of source IPs and ports to ignore
clear boolean
If true, clears the ignore list
TIP
One of the optional parameters is required.
Response A JSON structure with result indicator.
Example curl https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/save \
-d auth_token = EXAMPLE_AUTH_TOKEN \
-d flock_id = EXAMPLE_FLOCK_ID \
-d ignorelist = $'FIRST_IP_ADDRESS:PORT\n SECOND_IP_ADDRESS:PORT'
1 2 3 4
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/save'
payload = {
'auth_token' : 'EXAMPLE_AUTH_TOKEN' ,
'flock_id' : 'EXAMPLE_FLOCK_ID' ,
'ignorelist' : 'FIRST_IP_ADDRESS:PORT\nSECOND_IP_ADDRESS:PORT'
}
r = requests. post( url, data= payload)
print ( r. json( ) )
1 2 3 4 5 6 7 8 9 10 11 12 13
{
"result" : "success"
}
1 2 3
Set Ignore List to Global POST /api/v1/flock/settings/ignorelist/src_port/use_global
Set a Flock's ignore source port list to use Global.
Show details
Required Parameters auth_token string
A valid auth token
flock_id string
A valid flock_id
Response A JSON structure with result indicator.
Example curl https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/use_global \
-d auth_token = EXAMPLE_AUTH_TOKEN \
-d flock_id = EXAMPLE_FLOCK_ID
1 2 3
import requests
url = 'https://EXAMPLE.canary.tools/api/v1/flock/settings/ignorelist/src_port/use_global'
payload = {
'auth_token' : 'EXAMPLE_AUTH_TOKEN' ,
'flock_id' : 'EXAMPLE_FLOCK_ID'
}
r = requests. post( url, data= payload)
print ( r. json( ) )
1 2 3 4 5 6 7 8 9 10 11 12
{
"result" : "success"
}
1 2 3
Last Updated: 10/23/2021, 9:34:42 PM