Iptables newbie: Avoiding connections from 130.40.23.12
Hi.
I want to implement an Iptables rule to avoid any connection from 130.40.23.12. Is this correct? iptables -A INPUT -i eth0 -p TCP -s 130.40.23.12 -j REJECT Thank you very much. |
If by any connection, you mean TCP packets coming in on eth0 whose final destination is your machine, then yes, that is correct.
You could remove the -i eth0 and the -p TCP to reject all packets coming in on all interfaces (i.e. ICMP or UDP on eth0 or eth1): Code:
iptables -A INPUT -s 130.40.23.12 -j REJECT Code:
iptables -A INPUT -s 130.40.23.12 -j DROP |
All times are GMT -5. The time now is 01:23 AM. |