Issue
How to add multiple IPs to the whitelist in Imunify360?
Environment
- Any panel
- Any OS compatible with Imunify360
Solution
Put these IPs into the list.txt
file and execute the following command:
<list.txt xargs imunify360-agent whitelist ip add
Another way is to create an external whitelist and add it with the following:
-
Make sure that the necessary directory exists:
# mkdir -p /etc/imunify360/whitelist
-
Create an external list using any name and ".txt" extension. All such files will be combined to the blacklist:
# touch /etc/imunify360/whitelist/ext.txt
-
Populate the file with IP addresses or subnet addresses with a mask, e.g.:
# cat /etc/imunify360/whitelist/ext.txt
192.168.246.90
192.168.246.0/24 - Reload lists so that changes will be applied:
# imunify360-agent reload-lists
An alternative would be using bash:
Please add the list of IP addresses to the file:
# cat ip_list
37.120.131.40
5.134.119.194
165.227.116.222
92.38.139.226
...
And execute the following command:
# for i in $(cat ip_list); do imunify360-agent whitelist ip add $i --comment "IP from the list"; done
Comments
0 comments
Please sign in to leave a comment.