« Posts by MadRocketSci

How to Internet 101: Backups

Rule 1 about anything that touches the internet: This goes double for servers that are on all the time and configured by amateurs (you and me): KEEP BACKUPS.
Rule 2 of the internet: KEEP BACKUPS!

Always back up your data, your server configuration, and your databases. That way, when you view your site one day and discover it’s been overwritten by SEO spam selling viagra in chinese, you’ll be able to wipe it and restore.

If you’re handling customer data or people’s credit cards, you need a higher standard of security. If you are only serving content though, the easiest and best security is just keeping backups. You can always nuke it all and start over. With Linux, nuking it all and starting over is an hour exercise that doesn’t even require calling the Microsoft mothership for authentication.

backup the /etc directory (config files)
backup the /var directory (where you’ve probably put your mail and website files)
backup your /home directories

Some helpful database backup stuff for mysql:

Dumping a database to a backup file

msqldump -u username -p database_name > file.sql

Restoring a dumped database file to the database (first create the database)

mysql -u username -p database_name < file.sql

WordPress.com is getting censor-happy again

My home-bases on the internet are hosted on either server computers in my house, or servers that I rent from vanilla-hosting providers. I recommend Linode for hosting, and Namecheap for domain name registration. So far, they haven’t burned me.

Unfortunately, our cultural civil war has unleashed a bunch of censorious hyenas on our companies, and the interent as a whole. Payment processors, blog-service providers, hosting providers, and other services are being systematically denied to people because of their politics, or just the information they provide and the people they “associate with”. This is possible, because people have placed their content into the hands of a few centralized service providers.

Running your own server has never been more important, to preserve the freedom of the internet, to keep yourself from being silenced, and to keep your content from being arbitrarily stolen or destroyed by the asshole companies you entrusted it to.

Running your own blog on your own server is not difficult. If the email tutorial below scared you, don’t let it: most things aren’t as mind-numbingly complicated as a Postfix/Dovecot server. Your own instance of the wordpress blog software can be run on a server that you control. There are also many other php applications out there that are freely available to use (wikis, other blog software, php forums, etc). The whole infrastructure of the early-2000s internet is mostly available for free – all you have to do is sacrifice some SAN points to the penguin gods. But I think it’s well worth it in the end to have your own home online.

A comment I posted back in 2018:
On Adaptive-Curmudgeon’s blog (very fun blog, check it out): Link

Ditto. I moved my blog to a server that I rent. (I keep backups and can move it again to another server if necessary). WordPress’s recent misbehaviour though leads me to wonder if I should back up all my posts and media onto a different format entirely, in case they start trying to go after independent instances of their software through some backdoor.

I was also recently IP banned by google. That was a fun experience. I was looking up academic papers, but I must have looked up the wrong one in the wrong way (spin up the tinfoil beanie: there must be some deep dark secret about superconductivity!). It turns out there is absolutely no customer service number to call, and absolutely no one to appeal to. Not even an automated robot, as infurating as those are to deal with. If you’re banned by google, you’re banned. I called up my internet service provider to get them to reset my IP address, and they treated it like a federal crime to try to evade a google-ban. Something must be deeply wrong with me, my computer, or both, if I happen to be *disliked* by a mindless robot. Send the FBI! (I called sales the next day, and salesmen seem to have a more pragmatic attitude towards what they owe their *paying customer*, especially since I had one toe out the door at that point.)

While it is *thankfully* possible to go through different services, it’s nevertheless unsettling when the owners of a near-monopoly act like assholes. Just because it is possible to defend against assholish behavior, doesn’t mean that the world isn’t a less friendly place because of it. It could be one definition of a golden age: For a few brief decades, people cut each other a tiny break, do what they promise, and stop acting like jerks! Civilisation flowers.

I agree, learning how to defend against it and owning your own platforms are vitally important. It’s somewhat depressing that so many people have followed a convenience gradient down into placing all their content in just a few oligopoly platforms that they don’t own or control.

Email Server Instructions

I’ve written up a very rough draft of instructions on how to set up your own email server. These are instructions for setting up a Postfix/Dovecot server with OpenDKIM authentication on Ubuntu and Raspbian.

Link to Tutorial

I’m Back v2.0

Freedom!

I’ve been dealing with a *LOT* of stupid computer crap.

I recently moved my personal website from a Bluehost shared server to a linode instance. My last post was a little too ranty, so I’m cutting it short at this right now.

I’m going to post a tutorial on how I set up my mailserver later, as I think it’s important for people to be able to run their own internet utilities and sites.

Computers

I’ve been reading a book from a friend on the mathematics of infinity.

It occurs to me that our computers, every last postage-stamp sized little spinner, is at heart a trans-finitist. They believe in the integers, and not even all of the integers, but integers below a certain finite size. Everything else is a construction on top of them. Doesn’t seem to limit us too much from a practical standpoint….

An important Heinlein quote

Heinlein was an uncommonly wise man:

Secrecy is the keystone to all tyranny. Not force, but secrecy and censorship. When any government or church for that matter, undertakes to say to its subjects, “This you may not read, this you must not know,” the end result is tyranny and oppression, no matter how holy the motives. Mighty little force is needed to control a man who has been hoodwinked in this fashion; contrariwise, no amount of force can control a free man, whose mind is free. No, not the rack nor the atomic bomb, not anything. You can’t conquer a free man; the most you can do is kill him.” Robert A Heinlein

On the other hand, force sucks…

Weekend Woodworking Project

Last week I made a trip to Menards, a local midwestern home improvement store. Menards makes Home Depot and Lowes look pathetic. The quality of their wood is also amazing. Actually, I made two trips to Menards. 😛 The first one, then a bunch of woodworking mistakes, then a second trip for more raw materials.

There is a spot in my office that is bare right now that could use a 27″x60″ table jammed in the corner.

I made some plans.

TableProjectDrawing2

I assembled a tabletop (after learning a trick to plane the wood.) Glue joint down the middle. Edges planed together in a vise so that they’ll fit together almost perfectly. The thing was flat enough that I didn’t have to flail around on it with the woodplane.

I then cut those beautiful pine boards (seriously, they’re square, and sanded almost polished until they slide against one another.), measured and glued them down to the tabletop. This makes the frame which hold the legs.

20190703_211945

I ordered four “foursquare” 2.25″x29″ legs from tablelegs.com

20190703_211948

I then drilled and glued down the corners – the hardware pulls the legs against the frame producing a satisfyingly rigid, yet detachable joint.

20190705_124304

I created some V-blocks so I could squarely (more or less!) drill into the corners of each table leg. I inserted a threaded 1/4″-20 brass insert into the wood (courtesy of the local hardware store).

20190705_124300

The table was finally assembled today. Then I quickly stained it and will leave it to dry over the next two weeks.

20190705_162738There are a few small errors in the project which would probably make this unsellable. It is, however, pretty good for a first try, almost professional, and functional. When it finally dries, I’ll furniture polish it and place it in my office – more flat space to clutter up with junk! I mean, to work on.

Need to Blog Again

I need to start blogging again.

But more than that, I’ve been thinking lately about the use of the internet to communicate. I haven’t really been reading my friend’s blogs. Dissapointed to learn that one of my friends blogs at http://raymondscientific.com had gone offline. Hopefully it isn’t entirely defunct. People running their own blogs seems to make for a healthier internet than people using one of some small number of monopoly services as a client. It seems, when people want a forum to contact their friends, they all pile onto facebook or twitter.

The advantages: Everyone’s on there.’As I’ve learned in the past, it’s hard to have an active internet social life on an empty PhPBB forum. If no one is on an IRC channel but bots, then you can’t very easily have a conversation.

The disadvantages: Facebook isn’t a platform that you own or control. You’re putting your personal data and a record of your personal sentiments, as well as detailed information on who you’re friend’s with, how often you communicate, etc in the hands of this company. A company which, these days, seems hell bent on manipulating their users.

The belligerence of the tech monopolies has spawned various movements to produce alternatives. I’m not familiar with most of them, but may investigate later.

I’m going to start looking into doing more with my servers. It seems like in the early internet everyone had their own space/forum/what-have-you going. Popular webcomics all had their own forums. Every hobby on earth had it’s own forum (I remember one that I liked a lot – I think it was run by SEDs or the Mars society.) People owning and operating their own servers and forums seems like a desirable end goal (to me at least, to “people”, who knows?) Maybe if I figure out the ins and outs of some of this I can help by posting tutorials. “How to Internet: 101”.

I’ve tried before to create a dovecot/postfix e-mail server. Past attempts produced ill-configured junk and corrupted package lists. Maybe I’ll try again this weekend. This is apparently one of the more complicated and fiddly parts of setting up server services.

In Ye Olden Days there were mailing lists: Why don’t people use wide-distribution e-mail the way they use a centralized forum like Facebook? There wouldn’t be a forum to censor or shut down, just everyone’s e-mail server forwarding the messages. There would have to be a way to separate “serious/business e-mail” from “friends-and-family spam”, from “everyone else’s spam”. People probably don’t want their inboxes filling up with junk. Maybe a better set of sorting filters could take care of those sorts of problems?

Why do people use Facebook instead of PhPBB style forums?

Why do people use centralized chat services like discord, instead of everyone running their own IRC server?

Why do people use YouTube instead of hosting their own videos on their own servers?

(Monetization – YouTube makes it easy to collect ad revenue. That is, if they like you. If they don’t they’ll abuse you and play head-games with your listeners.)

(I expect there to be reasons in each case: Maybe pointing the way to the development (or re-development, as the case may be) of a less centralized internet.)

This weekend in electronics

All the stuff finally came in to try making my ADC board. Here it is:

The board

The board

The mess

The mess

 

This board is intended to be a general purpose lab DAQ board. Depending on how you set the resistors in the jumper slots, you can sense current, voltage (up to +/- 10V), and set the gain into the ADC and analog output. You can even route the analog output to something else. The way it is designed, it is +/-600V common mode tolerant and has a 130kHz bandwidth. (The main bottleneck being the high voltage differential chip)

 

Other features include:

  • The world’s worst SMD solder job.
  • Mysterious voltage divider behavior.
  • A broken signal generator, so I had to test it with batteries.

:-P. I can fix that. It seems to work though, which is pretty good for my second PCB project.

 

Design Files:

Kicad Files

 

Sequoia National Forest

If you are ever in California, there are a few things you really need to see. When my parents visited in April, we went up to Sequoia national forest. It really is a wonder of the world!

(I only recently got around to posting these, because disorganization:)

20180421_155941 20180421_155942 20180421_160146 20180421_160730 20180421_160748 20180421_160749 20180421_160751