Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Api for blacklists/spams/crappy ips?

2»

Comments

  • @DeadlyChemist said:
    Im building a project (reselling paperless to friends and friends' friends)

    I already got everything set up, except few additional things
    i have been using nginx setting auth_request /auth; # This will hit the Flask auth route for authentication alongside https://ipinfo.io/ to very some things about the IP, for example, most of my friends will never ever use my service from outside of germany, so blocking all non-german ip's is my (additional) seciurity.

    Nginx Proxy Manager isnt that great but does the job for routing.

    here is my question, does any ip or tool exist that can well, let me knwo if the ip is crap and i can stright block them? Free tiers only...

    Do you have any other ideas to filter requests?

    Paperless got great authentication, so i trust it fully, i just like to obfuscate and drop clearly crappy requests when i can

    You might want to look into services like AbuseIPDB, which offers a free tier to check IP reputation. Also, implementing rate limiting in Nginx can help mitigate unwanted traffic.

  • plumbergplumberg Veteran, Megathread Squad

    @DeadlyChemist
    What happens when a bad actor within Germany starts hitting your endpoints?

    If I were you, I would try to minimize over engineering and keep code base and os updated.

    You already acknowledged that the auth is pretty secure.

    Thanked by 1sillycat
  • yum install nginx-module-geoip

    check whether module is available

    find / -name ngx_http_geoip_module.so

    Edit nginx.conf file,something like below format

    user  root;
    worker_processes  1;
    worker_rlimit_nofile  65535;
    load_module modules/ngx_http_geoip_module.so;

    http {
    ......
        geoip_country /etc/nginx/GeoIP.dat;
        map $geoip_country_code $allowed_country {
        default no;
        DE yes;
        }
    .....
    }

    server{
    ......
    if ($allowed_country = no) {
        return 444;
    }
    ......
    }

    For GEOIP,you can download from here:
    https://mailfud.org/geoip-legacy/

  • ok, this is probably WAY overkill, but because of the fairly broad subject, peeps looking for info about IP blocking might find this useful.

    cymru has a beautiful, free, ip blocklist of bad actors. they'll even BGP peer with you so it gets automagically updates
    https://www.team-cymru.com/bogon-reference-http
    https://www.team-cymru.com/bogon-reference-bgp

    emergingthreats is the OG blocklist. worth knowing about.
    https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt

    pi-hole has taken over the lowend consumer side of this with a slew of ip and domain blocklists built-in.
    https://pi-hole.net

    searching 'blocklist' on github yields a slew of useful ip and domain-based blocklists, some of which are even part of commercial products these days.
    just using dnsmasq with some of these blocklists keeps a lot of the cruft at bay...

    hope this helps!

  • @greenhost_cloud said:

    @DeadlyChemist said:
    Im building a project (reselling paperless to friends and friends' friends)

    I already got everything set up, except few additional things
    i have been using nginx setting auth_request /auth; # This will hit the Flask auth route for authentication alongside https://ipinfo.io/ to very some things about the IP, for example, most of my friends will never ever use my service from outside of germany, so blocking all non-german ip's is my (additional) seciurity.

    Nginx Proxy Manager isnt that great but does the job for routing.

    here is my question, does any ip or tool exist that can well, let me knwo if the ip is crap and i can stright block them? Free tiers only...

    Do you have any other ideas to filter requests?

    Paperless got great authentication, so i trust it fully, i just like to obfuscate and drop clearly crappy requests when i can

    You might want to look into services like AbuseIPDB, which offers a free tier to check IP reputation. Also, implementing rate limiting in Nginx can help mitigate unwanted traffic.

    thanks !
    (i dont want to do rate limiting, but i'll try to limit ips)

  • @plumberg said:
    @DeadlyChemist
    What happens when a bad actor within Germany starts hitting your endpoints?

    If I were you, I would try to minimize over engineering and keep code base and os updated.

    You already acknowledged that the auth is pretty secure.

    i wish the bad actor good luck, because he'll need it
    worst case the LXC breaks and needs to be rebooted...

    my code is dead simple
    to enter unauthorized all you need is a paperless exploit, and in some cases german IP (or other country, depends on my friend)

    or brute force a username and password (hint, it's not admin-admin)

    Thanked by 1plumberg
  • @tommyluo said:
    yum install nginx-module-geoip

    check whether module is available

    find / -name ngx_http_geoip_module.so

    Edit nginx.conf file,something like below format

    user  root;
    worker_processes  1;
    worker_rlimit_nofile  65535;
    load_module modules/ngx_http_geoip_module.so;

    http {
    ......
        geoip_country /etc/nginx/GeoIP.dat;
        map $geoip_country_code $allowed_country {
        default no;
        DE yes;
        }
    .....
    }

    server{
    ......
    if ($allowed_country = no) {
        return 444;
    }
    ......
    }

    For GEOIP,you can download from here:
    https://mailfud.org/geoip-legacy/

    will pass, i dont want to mess with nginx proxy manager gui too much

  • @grooveuser said:
    ok, this is probably WAY overkill, but because of the fairly broad subject, peeps looking for info about IP blocking might find this useful.

    cymru has a beautiful, free, ip blocklist of bad actors. they'll even BGP peer with you so it gets automagically updates
    https://www.team-cymru.com/bogon-reference-http
    https://www.team-cymru.com/bogon-reference-bgp

    emergingthreats is the OG blocklist. worth knowing about.
    https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt

    pi-hole has taken over the lowend consumer side of this with a slew of ip and domain blocklists built-in.
    https://pi-hole.net

    searching 'blocklist' on github yields a slew of useful ip and domain-based blocklists, some of which are even part of commercial products these days.
    just using dnsmasq with some of these blocklists keeps a lot of the cruft at bay...

    hope this helps!

    will chek it out, im not doing BGP, im just trying to keep my setup very simple

  • grooveusergrooveuser Member
    edited December 2024

    @DeadlyChemist said:
    will chek it out, im not doing BGP, im just trying to keep my setup very simple

    you don't need bgp. you can just use the list (from the first link - plain text available via http - think wget or curl for automation and updates) and null route all those addresses.
    or block them with firwall rules. (or cloudflare waf, or iptables, or whatever is easiest for you.)

    the philosophy being: you KNOW they are bad actors. why wait until they try to connect? block them BEFORE they can even connect to your host.

  • blackblack Member
    edited December 2024

    I maintain a project called GetIPIntel. You can block VPN, proxy and bad IPs with it. The API is open and simple to use. If you just want to block all non-german IPs, there's a simpler solution using cloudflare's geolocation header. If you go with the geolocation blocking route, someone can buy a service from a server provider in Germany and bypass your geolocation restriction.

    Thanked by 1GenerallyClueless
  • @black said:
    I maintain a project called GetIPIntel. You can block VPN, proxy and bad IPs with it. The API is open and simple to use. If you just want to block all non-german IPs, there's a simpler solution using cloudflare's geolocation header. If you go with the geolocation blocking route, someone can buy a service from a server provider in Germany and bypass your geolocation restriction.

    will check it out ! thanks!!

    @grooveuser said:

    @DeadlyChemist said:
    will chek it out, im not doing BGP, im just trying to keep my setup very simple

    you don't need bgp. you can just use the list (from the first link - plain text available via http - think wget or curl for automation and updates) and null route all those addresses.
    or block them with firwall rules. (or cloudflare waf, or iptables, or whatever is easiest for you.)

    the philosophy being: you KNOW they are bad actors. why wait until they try to connect? block them BEFORE they can even connect to your host.

    i dont turt myself that much with networking....
    beeing honest here, but returning a 403 is enough for me...

    Thanked by 1black
  • @DeadlyChemist said:

    @wadhah said:
    take a look at crowdsec, it does exactly what you want.

    https://crowdsec.net

    cant find what i need or
    unsure how i would use it, my api gets the IP address and returns 200 or 403...

    Yeah, I would like to know how to block an entire country using CrowdSec as well. So far I have not touch its API, just ban entire ASNs and ranges using import function.

Sign In or Register to comment.