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

Post Reply
seco
Junior Member
Posts: 13
Joined: 01 Apr 2015, 19:57

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

Post 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,
sircon
Junior Member
Posts: 2
Joined: 12 Feb 2020, 11:09

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

Post 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.
Post Reply