Ask HN: Would there be a way to limit a website to geographically local traffic?

  • This is seldom a good idea in my opinion, because the underlying problem is rarely a technology one; moreover you can never be absolutely sure that you are indeed blocking all traffic, stopping users that use VPNs for example is tough.

    In case you have a legitimate application however, the fundamental way to do this would be to consult a database that maps ip ranges to ASs or country codes directly like this one: https://iptoasn.com/

    Once you have the affected ip ranges you can block them either at level 3 in a router or at the application level.

  • Building a network outward from a local web server rather than trying to hold back the ocean is a logically possible option. It's practical possibility depends on the degree of locality, the use case, and budget.

    In the case of a well established local community, creating accounts based on real world identity verification may be a viable alternative to handling the problem of the internet at the network level.

    Essentially, if holding back the internet matters the adversaries are well funded, automated, technically sophisticated, and legion. The best defense is probably social or network partitioning if the budget is not huge.

  • Putting some spin on those propeller hats: http://www.ibiblio.org/harris/500milemail.html

    TL;DR Measure the latency to the client, reject if too high. Of course, this also prevents connections from people who have high latency internet connectivity, such as most radio toys.

  • Use a CDN then block every other country. CF has a country code variable in the session data. Other CDNs have something similar.

  • I was under the weather yesterday, so barely spent any time online. I am surprised to see replies here.

    The use case:

    TLDR:

    I am stopping the San Diego Homeless Survival Guide. I am definitely going to be doing something else intended to be generally useful for homeless Americans. I am debating also separately curating a list of local homeless resources, but I have reservations about putting it out there for the whole world to see as I fear that may serve as an attractive nuisance. Due to the intended target audience, it seems to me that sign ups and a network likely won't work. So I wonder if there are ways to mostly limit it to locals from my end, even if the walls are leaky and imperfect.

    Longer:

    While homeless, I started a blog to keep track of information for me that I needed because the state of the art was paper handouts, often filled with inaccurate information.

    I went with a blog because: Papers make me sick. If you get rained on, they stop being readable. And when you are homeless, you have to carry everything you own all the time everywhere, so every piece of paper was one more thing to carry.

    Most websites for homeless services are donor facing. In other words, the main thrust of the website is to tell you "We do good work. Please give us money, donate goods and/or volunteer." So even if the agency has a website, it is incredibly challenging for an actual homeless person to go online and find out what services are available locally. Thus, my site attracted organic traffic even at a time when I had abandoned it and there were zero updates and zero attempts to promote the site because it was client facing: it listed information useful to actual homeless people looking for resources.

    I am not going to be updating the site further. I am leaving it up for now, but I don't want to promote it further.

    The longer the site went on, the more I tried to write generally useful information rather than location specific information. However, the name of the location is in the name of the site. This causes two problems: 1) People outside of the area see it as not relevant to their needs and 2) alternately, homeless people take the existence of the site as a suggestion to move there.

    I am again in an area with a fairly large homeless population. Locals here have voiced the opinion that the homeless are attracted to the area because there are services here. That may be a factor, but I think a more likely root cause is that it has relatively temperate weather for the state of Washington. January average lows are around 34 degrees. In Spokane and other parts of the state, average January lows are in the low to mid twenties.

    Most homeless services, like soup kitchens, are useful for helping people survive a crisis. But they tend to do a poor job of helping people solve their problems in order to establish a stable middle class life. To be fair, the kinds of problems that lead to homelessness are not easily resolved. But this situation means that accessing homeless services comes with a danger that you just get good at being a freeloader. This can actively undermine the pursuit of self sufficiency.

    When I was going to homeless services, it exposed me to germs and cigarette smoke and other health hazards, which undermined my efforts to get well enough to work and support myself. Most "practical" conversation amongst the homeless was about things like where to get another free meal or other charity, not about things like how to make money while homeless.

    It can take two hours of standing in line to get a free meal. If you do that three times a day, you have spent six hours just on staying fed. That is six hours you can't job hunt or otherwise try to solve your problems.

    The more talented you get at accessing homeless services, the more stuck you can become, in part because of how they are structured. They figure your time as a poor person isn't worth anything, so you should be okay with taking two hours to get a meal. Worse, many of them assume you are an alcoholic or addict, so they may subconsciously figure that the more of your time they waste, the less time you will spend getting high.

    While homeless, I figured out what kinds of things were genuinely helpful to me, things that helped me survive in the here and now while also helping me move towards my goals of self sufficiency rather than helping to keep me stuck. I want to keep writing about those things.

    But I have very mixed feelings about once again curating a list of local services. On the one hand, I think there is need for this information. On the other hand, I worry that broadcasting it worldwide may do more harm than good.

    Since all locations in the US seem to do an equally poor job of putting out client facing websites for serving the poor, it seems to me that simply creating a site with good client facing information potentially creates an attractive nuisance. If you are homeless and trying to find what you need locally is a constant uphill battle, but you can go online and find a curated list of resources in some other city, even if it is quite far away, it may be vastly easier to just hop a bus or hitchhike to that city than to keep knocking on doors and getting paper handouts locally and trying to painstakingly piece together information and solutions.

    So, I am wondering if making it hard to find a list of resources if you are outside the region would be a means to get information into the hands of locals without potentially attracting freeloaders from far flung corners of the US.