I am new to iptables and a bit confused. What I would like to know is, for example, if I need to block a certain IP from accessing my server, should I add the rule to the mangle table or the filter table to block the IP address?
Currently I block the IP in the filter table. Is that correct ?
More generally, when should we use the filter table, nat table, mangle table and raw table? I went through the iptables docs, but I find them confusing.