Menu

1 / 2

Flag Risky Signups in Python by IP: Tor, Hosting and Known VPN Networks

DEV Community: flask·Network Data Labs·about 21 hours ago
#ElyJahcW
#devtoflask#devto#dev#reasons#fullscreen
Reading 0:00
15s threshold

A FastAPI/Flask recipe that turns IP traits into an allow / verify / review decision, without locking out real users.

Why hard-blocking VPN users backfires

Plenty of legitimate people sign up from a VPN, a privacy relay or a phone on a mobile carrier network. Block them outright and you lose real customers while determined abusers just switch IPs. A better pattern: treat the IP as a risk signal , add friction (email verification, CAPTCHA, manual review) when signals stack up, and keep the reasons on the user record so you can tune later.

Get the real client IP in FastAPI or Flask

Behind Nginx or a load balancer, the socket address is your proxy.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.