Since version 8.0, Plesk has included a firewall module. This module is accessible from the control panel and makes it easy to configure your itpables-based firewall rules.
Though the module provides an easy to use interface for configuring the firewall, the tool does not configure firewall logging. When trying to debug connection issues, firewall logging can be very useful. You can enable logging with the Plesk firewall by manipulating the firewall at the command line.
The procedure is easy but you must be careful not to make any errors. Manipulating iptables always carries the risk of locking your self out. To enable logging, we use this quick workaround:
We create a new firewall chain for logging purposes. While there are many options for iptables, we just configure a simple logging rule called LOGDROP.
/sbin/iptables -N LOGDROP
/sbin/iptables -A LOGDROP -j LOG
/sbin/iptables -A LOGDROP -J DROP
Once this is created, we delete the normal drop rule. You can find the number of this rule with:
iptables --line-numbers -nL
and then remove it:
iptables -D INPUT 35
Where 35 is the last rule. Your number may vary.
We can now append our drop rule:
/sbin/iptables -A INPUT -j LOGDROP
In a few moments, check your /var/log/messages for firewall log messages. This is not permanent logging. Logging will be reset if you edit the firewall in the control panel or reboot the system.
This is just a simple way to turn on logging quickly while making minimum changes to the Plesk firewall system.






