Search code examples
ipiptables

Do i have reset service/something when banning an ip with iptables -j DROP


I just run this command

 iptables -A INPUT -s 1.1.1.1 -p TCP -j DROP

Do i have to reset a service or something like that? It does not seems to work because when i use netstat -antp i can still see the ip i just dropped


Solution

  • The TCP connection may still be kept open until the timeouts (up to 5 minutes if I remember correctly), but the traffic itself should be dropped (eg. there should be no data flowing).