I suspect iptables to refuse some connection attempts I do on some ports. How to view the log of connections refused by iptables?
I use iptables on Kubuntu 14.04 LTS x64.
sudo iptables -v -x -n -L
outputs:
francky@francky-Aurora-R4:~$ sudo iptables -v -x -n -L
Chain INPUT (policy ACCEPT 1735891 packets, 225230318 bytes)
pkts bytes target prot opt in out source destination
6368899 10355529368 fail2ban-ssh tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 3860995 packets, 5648955269 bytes)
pkts bytes target prot opt in out source destination
Chain fail2ban-ssh (1 references)
pkts bytes target prot opt in out source destination
6362396 10355135821 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0
sudo iptables -v -x -n -L
. If your computer is also a router also postsudo iptables -t nat -v -x -n -L
. If your iptables rule set has log statements for the blocks then, by default, they should be in/var/log/kern.log
and/var/log/syslog
. If your iptables rule set does not have log statements, then add them, even if just for a short time for debugging.sudo iptables -v -x -n -L
.