• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question add IP Addresses to the Firewall module in bulk using import and export function?

nikketrikke

Basic Pleskian
Hello
iI need to add ip address for cdn to be whitelisted on firewall
so
I created a rule for cdn ip list with 2 enters on firewall... then exported via json the firewall rules and named file (original to have as backup)...then using a text editor like Notepad++ I search where the 2 addresses listed are and simply put one by one comma separated all the address i need to whitelist...saved json file
then imported again the modified file (json) into firewall and seems all rules are a their position loaded correctly
Possible so simple????
How can i check if that addresses are correctly whitelisted? there is a shh command to view

iptables -L INPUT -v -n | less

i tried and some addresses are listed not the ip6 exadecimal address
thanks
 
If you want to list all IPv6 rules you have to use the ip6tables utility instead. For example: ip6tables -L INPUT -v -n | less

Also, on a side note, manually exporting, editing and importing firewall rules seems kinda time consuming, There are CLI command to manage firewall rules too. Which might be an easier way to bulk add IP address to rules. More info can be found here: https://support.plesk.com/hc/en-us/...rules-using-Plesk-Firewall-in-Plesk-for-Linux
 
If you want to list all IPv6 rules you have to use the ip6tables utility instead. For example: ip6tables -L INPUT -v -n | less

Also, on a side note, manually exporting, editing and importing firewall rules seems kinda time consuming, There are CLI command to manage firewall rules too. Which might be an easier way to bulk add IP address to rules. More info can be found here: https://support.plesk.com/hc/en-us/...rules-using-Plesk-Firewall-in-Plesk-for-Linux
thanks for the suggestion I see ip6tables ...
i know how to add single rule as in your link but the problem is adding many ip address one by one... my trick of exporting modify and importing json is for adding in bulk so many ip addresses... i not found a real answer in this forum or over the web
only one answer in a ver difficult way...
my solution seems so simple but i notknow if correct due it is so intuitive but never reported here or on the web
can you tell me if correct
 
not seems correct it does not works...
i make another workaround using CSF firewall and make a batch with a allow.txt file with all ip addresses... csf puts in iptables correctly..
then switch off CSF (due it send me a tons of email by LFD not solved) so i enable CSF and use it only to add in batch neww ip addresses then switch off again..
 
Back
Top