MySQL row size too large (>8126)

This is something to do with bad table design, where you are using multiply columns with Text values, the best solution would be redesign tables, but from time to time you need to patch it at-hoc without redesigning application that use that database.

Solution that usually works:

 

Facebooktwittergoogle_plusreddit

Export or save Putty configuration

From time to time we need migrate our putty configuration/sessions that we saved (configurations, IPs etc).

Putty store those data inside system register and those are some methods to extract them and save to new pc:

We end up with putty.reg on our Desktop which we can execute on new computer and enjoy with same settings/sessions as before.

Facebooktwittergoogle_plusreddit

Nagios – network/device configuration

If you don’t have working Nagios installation fell free to follow Nagios – New installation on Debian 9 link.

We will need to add folder structure (for better organization) to nagios config file:

Not everyone have luxury to always use smart switches around network – those make live a lot easier, but life is not a dream 🙂

Let us make a template for non-smart aka no-ping switches:

Now we can define few switches like this:

You can most variables put to template file so there will be even less writing

Most common type of templete is: linux-server (you can check others in /usr/local/nagios/etc/objects/templates.cfg )

After making few .cfg files inside our directory remamber to chown nagios:nagios -R /usr/local/nagios/etc/devices/ to avoid erros and restart nagios

Facebooktwittergoogle_plusreddit

Nagios – New installation on Debian 9

If you have to install a really great network those such as Nagios those will be steps needed:

1.Installing Apache2 + PHP (Skip if you already have one):

2.Installing Nagios core:

3.Installing Nagios Plugins (needed !)

4.Enable SSL for Nagios (and not only)

 

 

Facebooktwittergoogle_plusreddit

How to setup VPN with PPTP

In the past there was a Personal VPN Server (OpenVPN) which gave us more security than PPTP could give us.

Then why would you want PPTP ? Because its faster and have lower footprint on CPU than OpenVPN. That way you can pick which you prefer in your case scenario. Also there is build-in support for PPTP in most devices.

Install:

And restart service:

Check if pptpd is listening to 1723 port:

Now setup some network stuffs:

Next in terminal:

Thats all on server side.

 

Client configuration:

Create config file:

Now we can connect to server (using name of the config file – pptpserver):

 

Facebooktwittergoogle_plusreddit

Running a secure DDNS service with BIND

If you lack of static ip for your home machines but would like to have static address to access them there is a simple setup to make on your primary DNS server to achieve that.

On our client side let’s generate some keys:

This will results in creating Kkeyname.***.key and Kkeyname.***.private, we will need to copy key from *.private file which will look like this:

Now on server let us edit BIND configuration file (eg. named.conf or named.conf.local) and add:

From now on we can allow zone updates by editing zone declaration and adding allow-update:

Last thing that we need to do on server i restart BIND

 

On client side we would need to use something capable of updating dns records (eg. nsupdate)

 

Facebooktwittergoogle_plusreddit

Turn off additional telemetry from Mozilla Firefox

For starters I wouldn’t co all the paranoic about Mozilla getting some telemetry as most of them are not about privacy. Some of you probably will want to disable those also this could help speed up Firefox a bit.

Get into internal settings by typing about:config in url bar and turn all of these to false by double clicking

I wouldn’t recommend you to do this on any non-stable channel release as those are heavy related with telemetry and making Firefox great.

Facebooktwittergoogle_plusreddit

Creating swap partition

Swap partition is same thing as pagefile.sys for Windows. When we are using more RAM than we have, pagefile is used to store that extra data from memory.
For this Linux use swap partition. While you install Linux distribution most installers suggest to make swap partition that is twice the size of your RAM.
This is uncommon on VPS because that is a waste of storage on small servers.
But we can create and activate swap partition:

If Swap: 0 0 0 that means we aren’t using any swap partition.

Lets create and activate swap as root user:

Swap partition is use temporary, until we save information about it inside fstab:

Now we can enjoy swap even after reboot.

Facebooktwittergoogle_plusreddit

Mikrotik and Squid = Transparent Proxy

In business networks there is a big usage of  transparent proxy also home networks can use it also.

Thanks to that kind of server we can monitoring a lot of meta data and value information from client network and also prevent a lot of virus infections.

Lets assume that our server (192.168.0.10) have Ubuntu or Debian operation system installed on it and the lan network is 192.168.0.0/24.

On server there is also software firewall (iptables) which we will use to forward connection using commands below:

Next, on Mikrotik router we will add firewall rules to forward chosen clients (via list SQUID_CLIENTS) to server with squid proxy:

This way we finished configuration of proxy server which will capture web traffic and don’t need to be configure on client side.

Facebooktwittergoogle_plusreddit

Linux – .conf missing after package reinstall

Sometimes after manul removing config files and then reinstall package you end up missing .conf file from that package (ex. freeradius).

Use this command as solution (freeradius used as example):

 

Facebooktwittergoogle_plusreddit