Let's say I have all the technology, knowledge, materials, money and time to build my own homemade space rocket. Am I allowed to fly to space with it?
Might depend on where you are. I think it's illegal in North Korea. In the US, it is legally encouraged, by the Commercial Space Launch Act of 1984, especially the part that says "Congress declares that the general welfare of the United States requires that the Administration seek and encourage, to the maximum extent possible, the fullest commercial use of space". Previously, Congress passed the Communications Satellite Act of 1962, which first expressed an interest in allowing commercial flights, but there was substantial opposition to non-government entities in space. There are a number of legal private space adventures from numerous countries.
As Nate Eldridge points out, you still need government (FAA) permission. So it's legal to blast yourself into space in the same sense that it's legal to drive or to open a business.