Page 1 of 1

Can I see a log of blocked (dropped) connections?

Posted: 05 Feb 2020, 12:40
by seco
Hi,

I configured CSF to block all IPs expect my IP and everything is working perfectly.
Now, my question can I check those blocked IPs. As far as I know, they are dropped so there would be no log.

Regards,

Re: Can I see a log of blocked (dropped) connections?

Posted: 14 Feb 2020, 07:26
by sircon
You can try to turn on logging in iptables.
For example

iptables -I INPUT -p tcp -m state --state NEW --dport 443 -j LOG --log-uid --log-prefix "new connection to port 443"

The command above will log every new (not yet established) connection to server on port 443 in system log.