How to secure static IP address of instance from bot attacks?

0

I have several instances with virtual hosts set up, and the default host document root is /opt/bitnami/wordpress. All of my virtual host records point to their respective domain name/website directory. When someone visits the static IP address of the instance directly, it loads a forbidden error page, which is fine but when bots are attacking the static IP address, I don't know how to limit or prevent the attack. I have fail2ban running, but doesn't seem to be stopping them.

Is there something I can do with the default first virtual host record to stop direct access or at least send them away or limit them somehow?

One other consideration is that I'd still like to be able to test websites the way I usually do by accessing the static IP address with the directrory name. e.g. 11.22.333.444/domain.com.

BJSaws
질문됨 2년 전437회 조회
2개 답변
1

Hi, @BJSaws

From your tag, I'm guessing you're using Lightsail.
It is easy to introduce AWS WAF for BOT countermeasures.
However, Lightsail does not provide the ability to use AWS WAF directly.

You can use snapshots to migrate from Lightsail to EC2.
Alternatively, you can use the following link method to host the ALB + WAF in your default VPC and use VPC peering to forward traffic to Ligthsail.

https://blog.ddm.tri-stage.jp/2022/06/13/wordpress%E3%82%92%E6%A7%8B%E7%AF%89%E3%81%97%E3%81%A6%E3%81%84%E3%82%8Blightsail%E3%81%ABaws-waf%E3%82%92%E5%B0%8E%E5%85%A5%E3%81%97%E3%81%A6%E3%81%BF%E3%81%9F/

profile picture
전문가
iwasa
답변함 2년 전
0

Have you considered using AWS Web Application Firewall bot control?

profile pictureAWS
답변함 2년 전
  • Thanks. I ended up figuring out that I can restrict my lightsail instances to a range of IP addresses using the lightsail firewall...so I just restrict all traffic to be from Cloudflare IP address ranges.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠