All posts by g33k

Howto setup Rasbian Buster with BATMAN Mesh networking | raspberry pi 3 rasbian mesh batman network

I wrote this article a while ago about setting up BATMAN mesh networking with Rasbian Jesse on a Raspberry Pi 3.

This worked well, but stopped working with the newer versions of Rasbian, since there have been changes to the operating system.

After testing for several days, I found adding one command into the original script gets it to work just fine.

How to below.

After a fresh install of Rasbian Buster, connect to the system via ssh and run the following command to install BATMAN.

Lets create the mesh startup script.

The script will contain the instructions for bring up the interfaces and get  mesh, just change the IP address at the bottom on the next hosts, increment by one. Copy and past the following into the mesh.sh file.

Now let make the script executable.

And add to crontab so that its executed at every reboot

Add the following

Reboot and mesh should be up and running.

Test by executing the following command.

Should see something like this.

 

Raspberry Pi 3 error IPTables | Raspberry pi error – iptables v1.4.21: can’t initialize iptables table `nat’: Table does not exist (do you need to insmod?)

Was building a RPi3 machine and got the following error after an update.

Turns out nothing to worry about, just reboot the Pi.

Nextcloud 13 – 14 Error, Missing Appstore | nextcloud missing availible applications

I encountered an error yesterday which stopped the availible application being displayed on both my Nextcloud 13 and 14 installations.

It turns out to be a bug which can be fixed by inserting the following line into the installdir/config/config.php file.

The entire file should look something like this.

 

Setup a central rsyslog server Howto | Setup a central log server

This document has the instructions required to setup a centralized log server. This should be a minimum requirement for all organizations. A must have tool for intrusion prevention and detection.

Server Setup

Install rsyslog and vim text editor.

Edit the configuration file.

Ensure the configuration file has the following enabled.

Restart the service to allow the change of configuration to take effect.

The following command “netstat” will check to see which ports are open on the system and listening. Port 514 should be open and listening, waiting for logs to be shipped from the client.

If the above ports appear open, then the server configuration is operating correctly.

 

Client Setup

Let install rsyslog and vim text editor

Edit config file.

Appending the following line to the end of the configuration file. Ensure you change the IP address of the forward to the IP address of the rsyslog server configured earlier.

Restart rsyslog to allow the changes to take effect.

To test, issue the following command and tail the logs of the rsyslog server.

You should see the above quoted line appear on the servers logs.

 

 

Setup a backup job for your LAMP sites. | Setup a backup job for your LAMP sites.

I wrote a script which takes a backup of my webserver, taking a snapshot of all the website content, database, and configuration files.

Theory is if the webserver died, we would be about to result quickly using the data backed up.

On the server, put the following script and below is the cron entry which triggers every week. You will need up change the username and password for your mysql server.

This is the cron entry which fires up every friday.

Now this script will be on a linux machine somewhere else, it will connect and copy the backup archive file generated. You must first setup the ssh key so that its passwordless connection.

Simplicity it key! It works and will get you out of trouble. Well worth the 5minute investment.

 

 

Error when installing VLC on Fedora Core 27 | Error when installing VLC on Fedora Core 27

Got the following error when installing VLC on Fedora Core 27.

The correct way to install VLC on any FC new then 22 is,

This will work.

Raspberry Pi 3 A+ VS 3 B+ | compare the raspberry pi 3 a + to the 3 B +

The new Raspberry Pi 3 A+ was just released, basically its a cut down version of the 3 B+.

Here is a comparison between the two.

 

  RPi3A+ RPi3B+ Difference
CPU BCM2837B0 1.4GHz BCM2837B0 1.4GHz Same
Memory 512MB 1GB -512MB
Network Wifi, Bluetooth Ethernet, Wifi, Bluetooth -Ethernet
Size 65mm x 56mm 85mm X 56mm -20mm Shorter
USB Ports 4 1 -3

 

Simple way to backup your MySQL database everyday! | backup your mysql database everyday with this bash script.

This is a simple script to backup your MySQL database everyday and compress it on the fly, you just need to add an entry into Cron. see below

Script

The script will also data the new backup which stops it overriding the previous backup.

Edit cron

Enter this

This will kick off everyday at 9:22pm

Building a useful .ssh/config file for your SSH connections | setup to configure your .ssh/config file!

Writing a good ssh config file can make your life a whole lot easier especially if your an Linux Admin.

I have written a basic config file below which should be saved in the following location “~/.ssh/config”, when attempting to ssh its the first place SSH looks for instructions by default.

After the config if will go through in detail explain what each line does.

Host: this is like an alias, it will once you attempt to ssh to it, it will resolve using the Hostname field.

Hostname: Look above

Port: The port the ssh server is running on

User: the username you have on the server

Identityfile: This is your SSH private key location

ForwardX11: This is to allow you to see an X GUI session from the remote computer.

Keepalive: the next three are to enable keepalive which will ensure your SSH session stays active even after a period of inactivity. The two subsequent options enable you to configure the frequency of the keepalive packets.

Compression: this enables compression, this is especially useful over slow links. You will need to do more research for the senario which suits your connection and security requirements.

DynamicForward: This enables you to tunnle your connection to the remote host on the specified port. Simply setup your browser on socks5 proxy and point to localhost:port.

LocalForward: This enables you to setup tunneling. Simply specify your local reserved port and your remote IP and port which you want tunneled.