Yesterday when I was going to flash a router I needed a TFTP server, and as I like my system as it is I don’t want to install a TFTP server just to uninstall it again since I’m only using it for half an hour.
So I went searching for an TFTP server that didn’t require installation and was easy to configure, a Linux counterpart for tftpd32 for Windows. What I found was the Open TFTP Server wich also comes with an precompiled binary for Linux/Intel. It was also a dream to configure.
-
First we open up a terminal
-
Then we download the tftp server
wget http://downloads.sourceforge.net/project/tftp-server/tftp%20server%20Unix/Unix%20Stable%201.6/tftpserverspV1.62.tar.gz
-
Then we extract it and enter the directory and create a new tftp root folder
tar xvfz tftpserverspV1.62.tar.gz
cd tftpserversp
mkdir tftproot
-
Create a new file called config.ini, and inside it we put the following. Just remember to change the <USERNAME> to your username.
# Set the home directory where all files are stored
[HOME]
/home/<USERNAME>/tftpserversp/tftproot
# Set the username that the process will run under
[TFTP-OPTIONS]
username=<USERNAME>
Look at the tftpserver.ini that came with the server for more configuration options and explanation.
-
Now were ready to run the server, and we use the following command
sudo ./tftpserver -v -i config.ini
The -v parameter makes it run in Verbatim mode and not as a daemon, and the -i specifies the config.ini file we just created.
Now you just put all the files you want available in the /home/<USERNAME>/tftpserversp/tftproot/ folder and grab them through TFTP.
The other day I was setting up a mail server and webmail for the users. I chose Nginx for task of course, and after installing everything and setting up Squirrelmail I took it for a test drive.
I had already configured PHP to allow 64 MB uploads for the webmail users, and everything looked nice.. That was until I tried sending a mail with a 1.8 MB attachment.
After a little uploading the screen went blank and only displayed a 413 – Entity too large error message.
What too large?? 1.8 MB it’s not even 2 MB’s and I get an error, when it’s supposed to accept up to 64 MB uploads..
After some searching and questioning it came for an day that Nginx has a parameter called client_max_body_size that by default is set to 1 MB, way less than 64 MB that I wanted.
To fix that you have to open the file /etc/nginx/nginx.conf in nano or whatever and add the following between the http { … }
client_max_body_size 64m;
Please note that the value is 64m and not 64mb.
Then all you need is a restart of the nginx service
/etc/init.d/nginx restart
As you may or may not know, I have killed a couple of webpages and blogs lately and started thehook.eu. The reason for this is that I barely have the time, energy or pleasure of maintaining one site / blog. I also think it will lift the quality of the site. And to not make old mistakes new, this time I have the focus on the site as whole and not only the blog.
I have reposted most of the posts from earlier sites, and have updated the quite popular nWeb Script (formerly known as Ubinscript). I am also planning to write some articles here in the future, and adding more fun stuff.
I have removed both the Forum and Wiki, since it was mostly used by spam bots and not real people, and was causing more trouble than pleasure.
Right now the site has a few cosmetic quirks, and other stuff, but I am working on it. If you have any tips, feedback, wishes or problems, please do not hesistate to contact me!