[問題] 關於GCP架設 Django網站被外部攻擊

看板Python作者時間3年前 (2020/12/24 00:08), 編輯推噓0(004)
留言4則, 3人參與, 3年前最新討論串1/1
各位前輩們好,小弟在 GCP上有一台 group VM,但前陣子開始被不知名的國外 ip攻擊, 接著系統這邊會收到異常通知信,x.x.x.x是這台 gcp機器的對外 ip,而這台機器本身有 做 DNS。內部服務是使用 Docker。 想請問一下: 1) 上網查到的部分資訊:https://wemp.app/posts/5e044241-8cb6-42f1-bdeb-f414e060 1923 2) 這類的攻擊怎麼有辦法讓機器內部噴出 error?因為我測試過直接打 Django不存在的 url path,內部是會導向 404處理,對方是如何透過 request POST然後造成系統異常的 3) 處理方式: 我有先透過防火牆擋掉 IP,但是後續又有不同的 IP位置用一樣的方法去 攻擊這台VM,目前我只能一個一個把 IP加入防火牆規則,但有更好的解法去處理這類的攻 擊嗎? 錯誤通知信: Internal Server Error: /mifs/.;/services/LogService DisallowedHost at /mifs/.;/services/LogService Invalid HTTP_HOST header: 'x.x.x.x':443'. You may need to add 'x.x.x.x' to ALL OWED_HOSTS. Request Method: POST Request URL: https://x.x.x.x':443/mifs/.%3B/services/LogService Django Version: 2.0.1 Python Executable: /usr/local/bin/uwsgi Python Version: 3.5.9 Exception Type: DisallowedHost at /mifs/.;/services/LogService Exception Value: Invalid HTTP_HOST header: 'x.x.x.x:443'. You may need to add 'x.x.x.x' to ALLOWED_HOSTS. Request information: USER: [unable to retrieve the current user] 感謝各位前輩們的指教! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.136.222.127 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1608739713.A.DC3.html

12/24 09:00, 3年前 , 1F
cloudflaire
12/24 09:00, 1F

12/24 19:18, 3年前 , 2F
謝謝r大的回覆,想請問一下,是從clouldflare設黑
12/24 19:18, 2F

12/24 19:18, 3年前 , 3F
名單嗎?這樣跟從gcp上設定防火牆的差異是?
12/24 19:18, 3F

12/25 09:39, 3年前 , 4F
應該都有掛一層Nginx吧,看path應該找WAF服務(?
12/25 09:39, 4F
文章代碼(AID): #1Vusk1t3 (Python)