Live data from Hacker News

Website hosted on a 24 year old Linux server

raq.serialport.org

61–70 of 131 posts

Re: Website hosted on a 24 year old Linux server

#61

I remember how magical and mysterious a view counter used to feel when I was a kid. How did the website know when someone visited it? Where was the count stored? And how on earth could a website update its own HTML to show the new count? Geocities days were magical. I wonder if kids today have similar thoughts about Twitter profiles and such. It’s probably much easier to pick up the knowledge — back then, it was balk…

Why would it be more complicated today than back then? Just use Python, write the view counter into a text file and use javascript with polling (or websockets) for the realtime refresh.

Re: Website hosted on a 24 year old Linux server

#65

Earlier quoted context omitted.

> All you need to store this kind of data is a simple file. You mostly likely need a WAL Mode SQLite database. Most of the time, it's way simpler that handling state handling in concurrent situations yourself. (also, bindings are often available - if not outright bundled by default - under most common languages) The "easy" way is all fun and games until your file is accessed in a concurrent fashion, and then your opt…

For a guest book, you don't need anything like that. A simple solution could be to create a file for each entry. It's append-only anyway. For a view counter - yes, you can use a full blown database to concurrently increment a simple integer value; or, you could do it in a few lines of code by yourself too.

$ apt install redis-server

$ redis-cli INCR hit-count

Re: Website hosted on a 24 year old Linux server

#66

Earlier quoted context omitted.

I feel like you could do this without a database using the Linux kernel inotify API. Every time a file is accessed trigger an increment. It’s too beautiful of a day outside to try this right now but an interesting brain teaser!

Pretty sure Linux didn't have inotify then. Probably a CGI script updates a counter in a file.

Can confirm, that's how it was done. A simple text file.

Re: Website hosted on a 24 year old Linux server

#67
post #33
post #30

Earlier quoted context omitted.

You can also kill my server with a single client. Nobody has for the ~15 years that I've hosted on old laptops now. I've run game servers, a wiki mirror, file upload sites, a Tor exit node, torrent seeding, recently a VM image for a malware analysis course, all sorts of random tools and scripts, you name it; various different audiences but most with some technical know-how, yet nobody has felt the need. People have m…

The chance that someone wants to connect to your ancient server from an ancient client that can't pass Cloudflare's DDOS protection is probably way higher than someone wanting to DDOS it. (For example, most people may not realize that Cloudflare DDOS basically makes the website inaccessible via TOR for many people.) Preemptive protection against attacks that never come makes the internet worse for everyone.

This old chestnut again, really? You can whitelist Tor without any issues on CloudFlare. It's one of the first things most people do. Read the documentation.

Re: Website hosted on a 24 year old Linux server

#68
post #41
post #26

Earlier quoted context omitted.

Young kids today do not have any kind of thoughts about the workings of apps they use any more than they have thoughts about how their favorite shows or movies are made, or how their house was built, or how a car works.

Round here some of the teenagers show promise as tinkerers. Reverse engineering the e-scooters so you don't have to pay is popular. Old cars everywhere being rebuilt and modified. One guy has added a small engine to his pushbike using some kind of gear wheel coupling. They are making their own short films and fashion shoots now the Sun is out. Lets face it a smartphone is all you basically need to create (some kind o…

DIY is huge in 2023. Just look at YouTube.

Re: Website hosted on a 24 year old Linux server

#69
post #24

Earlier quoted context omitted.

Is there actually a bug that's remotely exploitable in the TCP stack, if you drop everything besides bound tcp ports in iptables? Any time I see a customer using an ssh or apache version from ten years ago (different from the kernel, but the kernel doesn't give you version disclosure), the list of bugs is all like "if they use RewriteRule and the second URI parameter is echoed unfiltered into a Location header by the…

I assumed myself there must be a lot of root privilege vulnerabilities in Apache, but it appears there isn't a single one: https://www.cvedetails.com/vulnerability-list.php?vendor_id=... All the above seem to be in other Apache products. I think the fact that Apache doesn't run as root helps to mitigate these risks. Having said that, I have had a server compromised (about 20 years ago), through apache, suexec and a v…

Don't get me wrong, I don't mean to recommend running ancient software and not caring about security! It was rather out of curiosity: for the past 20-something years, which is no guarantee for the future (especially with software getting more complex than ever), would there be a blanket issue if you follow best practices in general (like dropping ports in iptables if you don't need them), or is it only specific circumstances like if you use a found-to-be-vulnerable function like for filename sanitisation? I don't know of any blanket linux/apache compromises off the top of my head, but there very well might be some.

Re: Website hosted on a 24 year old Linux server

#70

Earlier quoted context omitted.

> Were you not shunned as a nerd for having an interest in how computers worked? I remember those days. There was one table in the lunch room where the 10 or so kids who were into computers sat. I found out later talking to some other classmates that nobody else wanted to talk to us because they thought they weren't smart enough.

Christ, that there were other kids with an interest in computers is amazing. I sat on my own lmao.

I had a friend to sit with at lunch and talk to excitedly about computers, PC gaming, robots, military hardware, etc. This was in the 90s.
Post reply on HN