- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
According to me the solution for this is to connect to the EC2 instance and drop the ip using the command #Check for IP tables
sudo iptables -A INPUT -s <IP-ADDRESS-TO-BLOCK> -j DROP
sudo service iptables save
Block an IP using firewalld
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="<IP-ADDRESS-TO-BLOCK>" drop' sudo firewall-cmd --reload
by following above steps we have block the IP tail -f /var/log/httpd/access_log # to check ip status
But if in the security group if AWS allows us to Drop an option in a custom where we can give the required ip i will be easier but this option we cant find.
create a rule in your Network Access Control List to deny traffic from that IP
https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html
Contenuto pertinente
- AWS UFFICIALEAggiornata un anno fa
- AWS UFFICIALEAggiornata un anno fa
- AWS UFFICIALEAggiornata 2 anni fa
Thank you. But If we create NACL rule it will be denied for all the instances in that network. Even we cant login to the ec2 tried this solution