diff --git a/README.md b/README.md index c41a9bb..d2424ae 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,48 @@ # DIY - Setting up the KaosCube -1. [Hardware](#hardware) +1. [General](#general) +2. [Hardware](#hardware) * [Components](#components) * [Installing the OS](#installing-the-os) -2. [Software](#software) +3. [Software](#software) * [Upgrade the OS](#upgrade-the-os) * [Setting up the Access Point](#setting-up-the-access-point) * [Installing firmware of the wifi dongle](#installing-firmware-of-the-wifi-dongle) * [Create network connection with new wifi dongle](#create-network-connection-with-new-wifi-dongle) * [Installing the KaosCube Interface](#installing-the-kaoscube-interface) -3. [Setting up functions of the KCInterface manually](#setting-up-functions-of-the-kcinterface-manually) +4. [Setting up functions of the KCInterface manually](#setting-up-functions-of-the-kcinterface-manually) * [Setting up the Hidden Service](#setting-up-the-hidden-service) -4. [Features](#features) +5. [Features](#features) * [Installing 12d1:1f01 Huawei E353/E3131 LTE Usb Modem](#installing-12d1\:1f01-huawei-e353\/e3131-lte-usb-modem) +# General + +This is a tutorial, how to set up the kaoscube with its kc-interface - work in progress.. + +An important Disclaimer: +The kc-interface is not ready yet. +I want to give you examples: + +1. When you connect through it to another wifi, to make a repeater out of it, you cannot use ? in the password. +I got aware of this problem today, and its not highest on my list of priorities. Use a password for your wifi, +that you want to repeat, out of numbers, letters and some !! instead. +2. It might not work at all to start a connection by one click, because the interface name changes. +Here I can only say to have a look at the code of the interface. +It is very, very easy and short. + +I will build and I am building all the features over time, such that you can actually create your hidden service from oneclick. +Until now, just follow the tutorial here, a bit more down you can find "setting up the hidden service". + +The kc-interface is mainly meant to teach you how to write interfaces that last, without having work or breaking updates. +And that you can write interfaces with few lines of code, and not with millions like most javascript stuff nowadays. + +How many dependencies does the interface need? Aside of its php code, NONE. +Ok I use tor - but that would be updated with apt update && apt upgrade. And thats also it. + +That said, have fun with building your digital autonomy - and do not hesitate to ask me stuff (after having tried a little) +about open source, security and stability of software (contact@cannabinieri.de) + + # Hardware ## Components @@ -32,29 +61,31 @@ Because Ubuntu is half proprietary, and there is a surveillance door for Amazon on the system, the KAOS Cube runs on ARMbian - Debian based. - - You could get a debian buster image from https://www.armbian.com/download/ for the orange pi zero, as sshd is still running by default on the resulting machine, for connecting. But all that images, if bullseye or buster, wont have a working ap enabling on board antenna driver. I also tried with openwrt, but that one did not even recognize the antenna. The image provided has these working drivers. And it gives an Access Point already configured. -On the newest Bullseye Security, one of the securest in the internet. +On a regularily updated Debian Bullseye, soon a Debian Bookworm. -Git clone the repository to get the image if you like. Or go on with an Armbian Buster image from your source of trust instead - but be aware that you wont have an access point over the on board antenna. +Or go on with an Armbian image from your source of trust instead. +Be aware that you wont have an access point over the on board antenna. +And be aware, that the sshd daemon is not running by default on the newest Armbian images (Bullseye and Bookworm) -And, more importantly, as of my writing, the xradio does not work with Bullseye and Bookworm. But that is writing of a year ago. +And, more importantly, as of my writing (2025), the xradio does not work with Bullseye and Bookworm. +Download the Kaoscube image under https://code.basabuuka.org/alpcentaur/kaoscube_image/kaoscube.img.tar.gz -Download the file from this repository. Then untar the archive with - tar -xzvf kaosimage.tar.gz + tar -xzvf kaoscube.img.tar.gz Now comes partitioning. Be careful. +Now insert a MicroSD card into your UNIX computer. + Look up the partitions, with lsblk @@ -63,32 +94,75 @@ Have a look that the microsd of minimum 30GB is not mounted, and the copying then has to go to the root of the microsd. -Copy binarywise the image to the device, not a partition if there is one: +To copy the image to the MicroSD, use the following command ( assuming /dev/mmlp is your MicroSD) sudo dd bs=4M if=kaosimage.img of=/dev/mmlp If your MicroSD Card has /dev/mmlp1 and /dev/mmlp2, do not copy to them, but copy to the whole device /dev/mmlp (the root) - Thats it! The free system should be installed. Put the MicroSD into your OrangePi. -Now connect the micro usb cable, and be careful to have the right Voltage and Ampere as specified on the internet. The Orange Pi will boot by supplying it with -power. +Now connect the micro usb cable, and be careful to have the right Voltage and Ampere as specified on the internet. +The Orange Pi will boot by supplying it with power. +A green light should start. -Here would come the part, how to connect over ethernet to other computers. +After less than a minute of waiting, you should see a new Wifi Accesspoint, called "Kaoscube". -The image provided just gives you a wpa2 encrypted interface and Access Point, so no need of ethernet and shared to other computers connection. -But as all the images have the same default password, it is not secure for first -setup of keys. Keys that will be placed on your client and on your new own autonomous server, to not let anyone intercept or play man in the middle. -If you are sure to be in a cage of aluminium or other ;) , you can also make your first connection over the Wifi of the Kaoscube. Your first relaxed connection over an Access Point - an Access Point the Kaoscube.image will generate when put on power. +Connect to it with the Password "PanoptikumOiOi666". -The SSID, the Password or the Access Point and the first user + its password will be published soon. Until then write me a private message or mail. +Now have a look on your UNIX Laptop which is connected to the Kaoscube. + +In the terminal, type in + + ip a + +In the output, you should see your interfaces. Take the interface, which stands for your internet connection. +It should have an IP resembling 10.42.0.x. + +The Kaoscube (AP) has the IP 10.42.0.1. + +Which means, that you can ssh on the Kaoscube now. +Issue + + ssh kaosuser@10.42.0.1 + +Type in the Password "t@uQ;a.e33iamY21!k" without the quotes. + +Now you should be on the kaoscube as the kaosuser. +The kaosuser is in the sudo group. +Which means, the first thing you should do, is to change the root password. +You can do that by issuing + + sudo passwd root + +Type in the Password without the quotes, and then type in the root password you want. + +Now you chosen the root password, which means you are officially the new owner of your kaoscube! -Now it goes on with the setup for base armbian systems from your source of trust, but the taking the old bullseye release, because it has ssh over ethernet enabled by default. +The next thing you should do, is to change your directory and open the file -For Connect your computer with ethernet (crossover, special one) cable to the orange pi zero. + /etc/ssh/sshd_config + +with root privilege ( by typing sudo for example ) + +Study the configuration parameters, and configure everything safe! +You should not use Passwords to login, you should use private and public key authentication. +But there are really a lot of good tutorials showing you how to do this. + + +## What I have done more or less - giving you extra questions + +Understanding means to understand what you do not understand. +That is why from now, comes a loose documentation of what I have done years ago. +Not everything might be accurate, and theoretically every step can be understood by printing out stuff from the kaoscube.. +without even reading through. + +Now it goes on with the setup for base armbian systems from your source of trust, but taking the old bullseye release, +because it has ssh over ethernet enabled by default. + +Connect your computer with ethernet (crossover, special one) cable to the orange pi zero. The first boot takes a bit longer, up to 2 minutes. Make sure, that not only the lights of the ethernet port on the orange pi zero have the lights on. @@ -101,29 +175,29 @@ connection on your Laptop, because the os did not start at all. Just replug the On the Armbian System, SSH on ethernet is enabled. We need to give the Pi an IP Adress now. - # Install a dhcp server, in my case it was Arch and dhcpd + # Install a dhcp server, in my case I was on an Arch Linux and I used dhcpd sudo pacman -S dhcpd Now we have to create a new local network. -The easiest way is to go into your graphical network-manager. Select the +I did that by going into my graphical network-manager. Select the ethernet connection to your Pi and go on settings. -In my case I went to IPv4 settings. Then I selected "Shared to other +I went to IPv4 settings. Then I selected "Shared to other computers" Method. After this add a new Address: - Address 10.0.0.1 # The 10.0.0.1 Number is normally used for local + Address 10.42.0.1 # The 10.42.0.1 Number is normally used for local # networks. Netmask 24 # You can also put in 255.255.255.0, which only # says to the dhcp to give a certain range of - # adresses starting at 10.0.0.0 - Gateway 10.0.0.1 # The Gateway is the adress of your laptop + # adresses starting at 10.42.0.0 until 10.42.0.254 + Gateway 10.42.0.1 # The Gateway is the adress of your laptop # itself Now you can run the command sudo arp -a -in your bash, after restarting the connection over ethernet to your Pi. +in your terminal, after restarting the connection over ethernet to your Pi. On your Orange Pi, the small green Light close to the mini usb port should be lighting. If the connection is established, you should see it @@ -134,6 +208,12 @@ image, or zero the first part of the partition, maybe it was not booting You will see an assigned IP Adress on your ethernet interface, on arch for me it was the standard one enp0s25 +To get the interfaces with their information on UNIX Systems like most Linux and BSDs +you can issue + + ip a + + The IP was 10.0.0.254, so I could connect through ssh with my Orange Pi now, and start to set up the system. @@ -177,7 +257,8 @@ That is why, we first check that. In case there is a break, we can have a rollback to before the update. Based on the cache of the package manager. -If everything went well on the other side, which will be the case if updates are made fast and rolled back directly if broken, then you can just go on to cleaning and auto cleaning the system and you are fresh to go. +If everything went well on the other side, which will be the case if updates are made fast and rolled back directly if broken, +then you can just go on to cleaning and auto cleaning the system and you are fresh to go. ## Setting up the Access Point (if you want to, because in the end the provided image has one configured, and one can copy paste that too. but one can extend too.) @@ -231,6 +312,37 @@ After all commands have run successfully, restart the system sudo reboot + +Within the Kaoscube image, I changed this a bit. +Instead of using the kelebek333 lib, I used another one, which has a script. +also it seemed, that he keeps it more updated, but I have to check this anothertime. + +In any case, upgrading the firmware inside the kernel would be + + git pull + sudo dkms add ./rtl8188fu + sudo dkms build rtl8188fu/1.0 + sudo dkms install rtl8188fu/1.0 + sudo cp ./rtl8188fu/firmware/rtl8188fufw.bin /lib/firmware/rtlwifi/ + +whereas on the kaoscube, where I used one with the small script, its enough to do + + git pull + sudo sh install-driver.sh + +When I installed, the maintainers notes where the following: + + Note: Updates to this driver SHOULD be performed before distro + upgrades such as Ubuntu 23.10 to 24.04. + Note: Updates can be performed as often as you like. It is + recommended to update at least every 2 months. + Note: Work on this driver, like the Linux kernel, is continuous. + + Enjoy! + + + + ## Create network connection with new wifi dongle (not sure if thats already or still on the image) First look up with ifconfig for the interfaces, and which one is the one of the dongle @@ -243,7 +355,7 @@ In addition, there should be one with the name wlx00... something. This one you should use with the following command: - nmcli device wifi connect 'FRITZ!Box 6430 Cable TL' password "98475637998946115486" ifname wlan0 + nmcli device wifi connect 'FRITZ!Box 6430 Cable TL' password "whateverpassword-your-internet-connection-has" ifname @@ -265,7 +377,7 @@ Now change to user (still being root) and go to home directory -Remember cloning the interface from git? +Clone the interface from git git clone https://code.basabuuka.org/alpcentaur/kc-interface.git