nginx additional config for lightwalletd to help against bots #12

Closed
opened 1 year ago by jahway603 · 4 comments
jahway603 commented 1 year ago
Collaborator

@onryo You can put this stuff in each server { } block you have in nginx to reduce stupid bot shite:

        # Get the fuck off my lawn motherfuckerz
        if ($request_method !~ ^(GET|HEAD|POST)$ ) { return 444; }

        # fuck these bots
       if ($http_user_agent ~* "Googlebot|YandexBot|bingbot|applebot|Mojeekbot|ICC-Crawler|SemrushBot|xforce-security.com|TestBot|MauiBot|CCBot|SummalyBot|PetalBot|BLEXBot|expanseinc.com|clark-crawler|AhrefsBot|mj12bot|YisouSpider|opensiteexplorer|seznambot|dataforseo|Adsbot|Neevabot") {
                 return 444;
       }

        location ~* .(display_errors|set_time_limit|allow_url_include.*disable_functions.*open_basedir|set_magic_quotes_runtime|webconfig.txt.php|file_put_contentssever_root|wlwmanifest) {
                return 444;
        }

        location ~* ^/wp-content/.*$ {
                 return 444;
        }

Originally posted by @duke in hush/hush3#102

@onryo You can put this stuff in each `server { }` block you have in nginx to reduce stupid bot shite: ``` # Get the fuck off my lawn motherfuckerz if ($request_method !~ ^(GET|HEAD|POST)$ ) { return 444; } # fuck these bots if ($http_user_agent ~* "Googlebot|YandexBot|bingbot|applebot|Mojeekbot|ICC-Crawler|SemrushBot|xforce-security.com|TestBot|MauiBot|CCBot|SummalyBot|PetalBot|BLEXBot|expanseinc.com|clark-crawler|AhrefsBot|mj12bot|YisouSpider|opensiteexplorer|seznambot|dataforseo|Adsbot|Neevabot") { return 444; } location ~* .(display_errors|set_time_limit|allow_url_include.*disable_functions.*open_basedir|set_magic_quotes_runtime|webconfig.txt.php|file_put_contentssever_root|wlwmanifest) { return 444; } location ~* ^/wp-content/.*$ { return 444; } ``` _Originally posted by @duke in https://git.hush.is/hush/hush3/issues/102#issuecomment-1651_
Collaborator

It was added and can be closed.

It was added and can be closed.
onryo closed this issue 1 year ago
Poster
Collaborator

I don't see a commit in docs where it was added, so re-opening this issue.

I don't see a commit in docs where it was added, so re-opening this issue.
jahway603 reopened this issue 1 year ago
Collaborator

My bad, I thought I needed to just add it to my nginx file since you pinged me directly.
It should be fixed in acde779dfe.

My bad, I thought I needed to just add it to my nginx file since you pinged me directly. It should be fixed in https://git.hush.is/hush/docs/commit/acde779dfecf825178552caeed2c4c119ec02e06.
Collaborator

Closing.

Closing.
onryo closed this issue 1 year ago
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.