On Sunday 30 January 2011 01:32 PM, Cory McPherson wrote:
Hello, I'm new to iptables and would like to block an IP. How do I achieve that? More specifically, I'd like to block it from accessing a specific port but other ports should be accessible to that IP... Can someone give me an example? Thanks PS: please CC me as I'm not subscribed to the list. -- To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
Assuming your protocal is tcp: iptables -A INPUT p- tcp --source <IP Address> --dport <Port No.> -j REJECT Regards, Seenu. -- To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html