Quantcast
Channel: 4MLinux Blog
Viewing all 51 articles
Browse latest View live

Telnet server in 4MLinux

$
0
0
4MLinux has the following set of its main servers: FTP, HTTP, SSH (with SFTP), and Telnet. This post aims to describe shortly how to use the Telnet server. 4MLinux includes a Busybox applet as its Telnet server daemon.

Note:
Telnet connections are not very secure because unencrypted data is transferred. Therefore telnet protocol should be applied inside trusted local networks only. Servers connected to the Internet should use Secure Shell (SSH) instead.

1) Open your terminal and execute the 'telnetd' command:



2) Let's start the server ('telnetd start') and check if it really runs ('telnetd test'). After you execute these two commands, you will see the following login screen:
 


3) By default, none of 4MLinux servers is started automatically during the boot, but you can change this by setting 'TELNET' to 'yes' in the /etc/server/autostart.conf file:



4) If you are a fun of TUI (like I am :-), then you can use the 'telnet' command as your Telnet client (just try it yourself in your terminal). If you prefer GUIPuTTY will be the best choice for you:




Note:
4MLinux uses inetd to manage its main servers.

Further reading:
FTP-HTTP - SSH - TELNET - FIREWALL - PROXY - MONITORING

HTTP server in 4MLinux

$
0
0
4MLinux has the following set of its main servers: FTP, HTTP, SSH, and Telnet. This post aims to describe shortly how to use the HTTP server. 4MLinux includes a Busybox applet as its HTTP server daemon.

Note: 4MLinux 9.1 Server Edition (and later) uses Apache (with PHP and MariaDB) as its default HTTP server. There is a self-explanatory online demo at http://server.4mlinux.com.


1) Open your terminal and execute the 'httpd' command:



2) Let's start the server ('httpd start') and check if it really runs ('httpd test'). After you execute these two commands, you will see the following menu screen:
 


3) Now you can run, for example, the "Private HTML" test:
 



4) By default, none of 4MLinux servers is started automatically during the boot, but you can change this by setting 'HTTP' to 'yes' in the /etc/server/autostart.conf file:



Additional notes:
1) The HTTP server is located in the /srv/http directory by default.
2) httpd configuration files are located the /etc/httpd directory by default.
3) 4MLinux uses inetd to manage its main servers. 

Further reading:
FTP-HTTP - SSH - TELNET - FIREWALL - PROXY - MONITORING

4MLinux Firewall

$
0
0
This is a short guide on how to use 4MLinux Firewall (based on iptables), which is available in 4MLinux Server Edition, 4MLinux Allinone Edition, and TheSSS.


1) Open your terminal and execute the 'firewall' command:



2) Let's start the firewall ('firewall start') and check if it really runs ('firewall test'). After you execute these two commands, iptables status will be displayed:
 


3) Firewall configuration files (/etc/firewall/config and /etc/firewall/black.list) may look as follows:
 


Note: IP addresses listed in the black.list file will not be able to access your server.


4) By default, none of 4MLinux servers is started automatically during the boot, but you can change this by setting 'firewall' to 'yes' in the /etc/server/autostart.conf file:



Further reading:
FTP-HTTP - SSH - TELNET - FIREWALL - PROXY - MONITORING

Monitoring software

$
0
0
4MLinux includes a wide set of small monitoring programs using the ncurses interface. These are powerful tools, which are especially useful as a part of your server software. This is why they are included in 4MLinux Server Edition and TheSSS.


1) Execute the 'nmonitor' command in your terminal. The following menu screen will be opened:



2) General system info via nmon:



3) Top running processes via htop:



4) Disk usage via ncdu:



5) Network activity via netwatch:



6) Traffic data via iptraf:



7) WiFi interface via wavemon:



8) Bandwidth usage via iftop:



Further reading:
FTP-HTTP - SSH - TELNET - FIREWALL - PROXY - MONITORING

Proxy server

$
0
0
This is a short guide on how to use a proxy server (Polipo with Tor), which is available in 4MLinux Server Edition, 4MLinux Allinone Edition, and TheSSS.


1) Open your terminal and execute the 'proxy' command:



2) Let's start the server ('proxy start') and check if it really runs ('proxy test'). After you execute these two commands, Links web browser will be opened:
 



3) Open /etc/polipo/readme.txt to get essential info about your proxy server:
 


4) The operating mode of Polipo ('memory', 'disk', or 'tor') can be set in its configuration file (i.e. /etc/polipo/polipo.conf):
 


5) By default, none of 4MLinux servers is started automatically during the boot, but you can change this by setting 'proxy' to 'yes' in the /etc/server/autostart.conf file:




Further reading:
FTP-HTTP - SSH - TELNET - FIREWALL - PROXY - MONITORING

TheSSS

$
0
0
TheSSS (The Smallest Server Suite) is a lightweight server suite distributed as a live CD. It is designed for system administrators who need a small (liveCD is about 30MB in size) set of server software for small local area networks. The supported servers are FTP, HTTP, SFTP, SSH, and Telnet. A proxy server (Polipo) with the Tor anonymizer is also included. The main security components are a 4MLinux Firewall (based on iptables) and Clam AntiVirus. TheSSS tries to follow the KISS principle as it was shown in this post.
 
Notes: TheSSS boots in the same way as 4MLinux does (this was described here).


1) Boot your copy of TheSSS:





2) After executing 'help', you will see the following screen:



3) Let's try the 'server' command now:


Notes: 
- There are some links at the bottom of this page. Follow them to learn more about particular servers included in TheSSS.
- If you need to configure your Internet connection, you should run the 'netconfig' script (the procedure is very similar to the one described here).


4) Additionally, TheSSS provides an antivirus protection, which works in the exact same way as it was shown in this post.



5) The installation of TheSSS to a hard disk drive can be performed by running the 'install2hd' script (have a look at this guide).



6) TheSSS hasMidnight Commander (file manager) and Links (text-based web browser), which can be very helpful in some cases:

  

  

Notes: 
- TheSSS is able to make a backup of your data (and to send it to a remote FTP server if desired). Just try it yourself by executing 'backup' and 'fsbackup'  commands! 
- TheSSS is also able to display a huge number of information about your system. You can view them by executing the 'nmonitor' command.



 

Further reading:
FTP-HTTP - SSH - TELNET - FIREWALL - PROXY - MONITORING

Opera (web browser).

$
0
0
Opera is one of the five downloadable extensions, which are available in each version of 4MLinux (the other ones are: CalmAV, Partition Wizard, SMPlayer, and LibreOffice). Once installed, Opera becomes a default web browser.


1) Choose Opera from the Internet Menu:



2) You must confirm the installation:



3) Now 4MLinux will download and install the newest Opera for you:




4) You must agree to the License Agreement:



Done!



Note: read this post to learn how to install Firefox with Flash Player in your 4MLinux.

SMPlayer with SMTube

$
0
0
SMPlayer is one of the five downloadable extensions, which are available in 4MLinux 6.0 and later (the other ones are: CalmAV, Opera, Partition Wizard, and LibreOffice).


1) Choose SMPlayer from the MPlayer Menu:



2) You must confirm the installation:



3) Now 4MLinux will download and install SMPlayer for you:




4) Press F11 to open SMTube:


Done!

BakAndImgCD

$
0
0
BakAndImgCDis a very small (about 20 MB in size) Linux-based operating system, which has been designed to perform the following two tasks: data backup (the supported filesystems are: btrfs, ext2, ext3, ext4, FAT, HFS, HFS+, jfs, Minix, NTFS, ReiserFS, and XFS) and disk imaging (using Partimage, Partclone and GNU ddrescue). The output files (archives and images) can be optionally compressed and sent to a remote FTP/SFTP sever (via Ethernet, WiFi or Dial-up interface).
 
Note: BakAndImgCD boots in the same way as 4MLinux does (this was described here).

1) Boot your copy of BakAndImgCD:





2) After executing 'help', you will see the following screen:



3) Let's have a look at some main commands now.

'backup' (manual backup of selected files)


'fsbackup'(automatic backup of all files)


'image'(creation of disk images)


'netconfig'(the Internet connection setup)


4) Disk imaging utilities included in BakAndImgCD.

Partimage:




GNU ddrescue:

Note: 
Partimage is (in my opinion) the best, but it does not support ext4 and btrfs filesystems. Partclone in BakAndImgCD is setup to create 'raw images', meaning that any kind of partition can be imaged. GNU ddrescue should be applied in case of read errors (to rescue data from partitions with bad blocks).


5) Additionally, BakAndImgCD hasMidnight Commander (file manager), Links (text-based web browser), and cfdisk/cgdisk (simple MBR/GPT partition managers), which can be very helpful in some cases:

  

  






Mobile Broadband Modems

$
0
0

Are you using your mobile phone or USB  modem to connect to the Internet? Let's try to configure it now!

1) Attach your mobile phone or USB modem (these pictures were taken in my kitchen :-)




2) Select Configure from the Internet Menu:



3) A terminal window will be opened. You are configuring a dial-up connection, so you should choose '3' and press Enter:


4) Now you must insert the data required by your ISP (Internet Service Provider), for example:


Note:
'phone number' is obligatory, while 'username' and 'password' are not required by many network operators (if so, you can skip them by pressing Enter).

5) It's time to connect to the the Internet. Your modem will be configured and initialized automatically:





Done!
You can close the 'MODEM' window now.

Additional info:
1) If 4MLinux is unable to detect your modem, then re-attach this modem, wait a few seconds, execute the 'udev' command (in terminal), and try to connect again.
2) Location of configuration files in 4MLinux: the default network interface is defined in
the /etc/interface file. All other networking settings are stored in the /etc/net directory.


Abuse, Doom, Quake...

$
0
0
4MLinux Game Edition includes ready-to-use pieces of software (game ports) needed to play Doom and other classic "shoot'em up" games, but so called wads (or their equivalents) must be downloaded separately.
 
Note: it is a good idea to enable 3D drivers when you are going to play video games (this was described here). 2D drivers can also be used, but they will give you lower graphics quality (e.g. smaller screen resolutions).

1) Select Doom from the Mystery Menu:



2) You must confirm your download by choosing 'y' and pressing Enter:

 


3) Now 4MLinux will download and install shareware data (the doom1.wad file):


Note: wad files (or their equivalents) for all the other games (listed below) can be installed in the exact same way as for Doom.


 4) You will be able to play the following games:












HINT: 
Have I mentioned that 4MLinux loves TUI? All the games can be played both with and without X. Just close your X Window System, and execute the "doom" command (or: abuse, freedoom, heretic, hexen, quake).

Have fun :-)

The FOX Toolkit

$
0
0
The basic version of 4MLinux is less than 45 MB in size. This is possible because 4MLinux Desktop is based on a very light window manager (JWM) with a set of relatively small applications from  The FOX Toolkit. These programs are tiny but powerful (e.g. they are able to handle JPG, PNG, and TIFF graphics; 3D support via Mesa drivers is also compiled-in). 

Note:
This post describes The FOX Toolkit in 4MLinux 6.1. Other versions may differ a bit.

1) Applications:
File Manager

Text Editor

Calculator

Screen Shooter


2) The Fox Toolkit includes Control Panel, which makes it very easy to customize and apply your own settings:




3) The full version of 4MLinux has X File Explorer as its default file manager (which is also based on the the FOX library):



Note: you can change the default file manager by editing the /etc/fm/fm.conf file.



4MLinux Releases

$
0
0
4MLinux has its unique software development schema. I will try to explain this, taking 4MLinux 6.1 as an example.


1) 4MLinux 6.1 Core. It has only the Linux kernel image, sysinit script, BusyBox, and glibc libraries required by BusyBox. No additional packages. No additional drivers. Therefore 4MLinux Core has a very limited support for devices, so it is recommended to run it in VrtualBox.

Official Freecode announcement:
This is a core system (about 5 MB in size) for the 4MLinux 6.1 series. The system includes: Linux 3.9.0, glibc 2.16, and Busybox 1.20.2. All 4MLinux 6.1 applications have been compiled under Fedora 18 (x86/32-bit/SMP) with GNU Compiler Collection 4.7.2.


2) 4MLinux 6.1. 4MLinux packages are called "addons". For example, 4MLinux package including version 2.1.0 of JWM is named addon_jwm-2.1.0.tar.xz. To cut a long story short, we can define 4MLinux 6.1 as follows:

 4MLinux 6.1 =  4MLinux 6.1 Core + main addons

Official Freecode announcement:
The main features in this release are maintenance (4MLinux Backup Scripts 6.1 and Clam AntiVirus 0.97.8), multimedia (MPlayer SVN-36169-4.7.2 and FFmpeg Git-2013-04-09), a mini server (FTP, HTTP, SSH, SFTP, and Telnet), and mystery (a collection of small Linux games). The X Window System is based on X.Org Server 1.14.0, Mesa 9.0.3, JWM 2.1.0, and the FOX toolkit 1.6.49. Both Ethernet (including WiFi) and dialup (including fast USB modems) networking are supported. The size of the ISO image is about 45 MB.


3) 4MLinux 6.1 Allinone Edition BETA. 4MLinux uses Wine to run win32 ("exe") applications under Linux. For example, addon_putty-wine-0.62.tar.xz includes a Windows version of PuTTY to run with Wine. We can define 4MLinux 6.1 Allinone BETA as follows:

 4MLinux 6.1 Allinone BETA =  4MLinux 6.1 + wine addons

Official Freecode announcement:
The development target for this release has been defined as follows: The relatively small operating system (ca 67 MB LiveCD) must include the newest stable Wine (i.e., 1.4.1), which should be able to open fullscreen flash videos (e.g., from YouTube) in the newest stable Firefox (i.e., 21.0). 4MLinux 6.1 Allinone Edition BETA passes this test for many Intel, NVIDIA, and AMD video cards. WinSCP 5.1.4, XChat 2.8.9, and 7-Zip 9.20 are also included.


4) 4MLinux 6.1 Rescue Edition. The first "M" in 4MLinux means "Maintenance" (disk partitioning, performing backups, and the like):

 4MLinux 6.1 Rescue Edition =  4MLinux 6.1 Allinone BETA + maintenance addons

Official Freecode announcement:
This is an updated version of 4MLinux 6.0 Rescue Edition using 4MLinux 6.1 as a core system. The main applications are: X File Explorer 1.34, Midnight Commander 4.8.8, 4MLinux Backup Scripts 6.1, Partimage 0.6.9, Partclone 0.2.58, TestDisk 6.13, GNU ddrescue 1.16, GNU Parted 3.1, Clam AntiVirus 0.97.8, 7-Zip 9.20, UNetbootin 584, and InfraRecorder 0.53. The supported filesystems are: btrfs, ext2, ext3, ext4, FAT, HFS, HFS+, jfs, Minix, NTFS, ReiserFS, and XFS.


5) 4MLinux 6.1 Media Edition. The second "M" in 4MLinux means "Multimedia" :

 4MLinux 6.1 Media Edition =  4MLinux 6.1 Allinone BETA + multimedia addons

Official Freecode announcement:
This is an updated version of 4MLinux 6.0 Media Edition, using 4MLinux 6.1 as a core system. It has a wide set of applications for playing (MPlayer SVN-36169-4.7.2, xine 1.2.3, TiMidity++ 2.14.0, MikMod 3.2.0), recording (Audacity 2.0.3, SoX 14.4.1), and ripping media (DVD Shrink 3.2.0.15, MEncoder SVN-36169-4.7.2, FFmpeg Git-2013-04-09). Xpdf 3.0.3 and XPaint 2.9.9.4 are also included.


6) 4MLinux 6.1 Server Edition. The third "M" in 4MLinux means "Miniserver" :

 4MLinux 6.1 Server Edition =  4MLinux 6.1 Allinone BETA + server addons

Official Freecode announcement:
The servers controlled by the inetd daemon are now: FTP (vsftpd 3.0.2), HTTP (Busybox 1.20.2) with HTTPS (via Stunnel 3.22), SFTP (OpenSSH 6.2p1 ), SSH (Dropbear 2013.58), and Telnet. A proxy server (Polipo 1.0.4.1 with Tor 0.2.3.25), WinSCP 5.1.4, rdesktop 1.7.1, and EchoVNC 2.40a are also available. The programming environment includes the thttpd build of PHP 5.5.0, the minimal version of Perl 5.16.3, and SQLite 3.7.17. The main security components are 4MLinux Firewall 6.1 (based on iptables 1.4.19.1) and Clam AntiVirus 0.97.8. There is an online demo (server.4mLinux.com), too.


7) 4MLinux 6.1 Game Edition. The fourth "M" in 4MLinux means "Mystery"  (Linux games) :

 4MLinux 6.1 Game Edition =  4MLinux 6.1 Allinone BETA + game addons

Official Freecode announcement:
This is an updated version of 4MLinux 6.0 Game Edition, using 4MLinux 6.1 as the core system. The 4MLinux collection includes, among other things, the following items: classic"shoot'em up" games (Abuse, Doom, Heretic, Hexen, and Quake), Liero (a realtime "Worms-like" game), Lincity (a construction and management simulation game), space shooters (XGalaga, Kobo Deluxe), and DOSBox 0.74 with some Freeware DOS games. Michael Speck's LGames and ec64 (a Commodore C64 emulator) are also available.


 8) 4MLinux 6.1 Allinone Edition FINAL. Lets mix all the above items together!

Official Freecode announcement:
This is the final (stable) release of 4MLinux 6.1. It has all the features included in 4MLinux 6.1 Rescue Edition, 4MLinux 6.1 Media Edition, 4MLinux 6.1 Server Edition, and 4MLinux 6.1 Game Edition.


NOTE: 
Starting from 4MLinux 6.1, it is possible to download and update your system without needing to reinstall it from scratch. This should be done in the following two steps:
  • updating the current system ("4mlinuX get4mlinux"), 
  • installing a new system ("zk update"). 
These two commands will install the latest stable version, which is now 4MLinux 9.1 Allinone Edition.

Ripping of audio CDs

$
0
0
This post describes the way of ripping of audio CDs in 4MLinux Media Edition (or 4MLinux Allinone Edition). Insert your audio CD please ;-)


1) Select Ripper Script from the Multimedia Menu:



2) You're going to rip your audio CD, so you should choose 1, and press Enter:



3) Choose the output format (e.g. mp3):



4) Now you have to wait patiently:




5) You will find your files in the rip_output directory:



6) You can also edit your mp3 with Audacity:

 



Enjoy your new mp3 collection!

The KISS principle in 4MLinux Server

$
0
0
Mini Server (both in 4MLinux and TheSSS) tries to follow the KISS (Keep It Simple Stupid) principle. I will try to show this taking the HTTP server in 4MLinux 7.0 Server Edition as an example.

The guide on how to start and configure the HTTP server (with additional services) is as follows: execute the "httpd start" command in terminal. And that's it!



FAQ:
Q: How to enable PHP support?
A: It's already enabled.

Q: How can I start MySQL (MariaDB)?
A: It's already running. You've started it with the "httpd start" command.

Q: How can I perform post-install configuration of MySQL?
A: You've already done it with the "httpd start" command. Have a look at http://localhost/adminer.php

Q: But I need to generate root password for my MariaDB !
A: You've already done it with the "httpd start" command. You will find a randomly generated root password in /root/.mysql_passwd.

Q: I would like use the "https" protocol. How to start Stunnel ?
A: You've already started it with the "httpd start" command. Just try to open https://localhost in your browser.

Q: How to enable virtual hosts support?
A: It's already enabled.

...................
...................
...................

NOTE:
The above FAQ shows that 4MLinux Server is designed to enable a reasonable set of features out of the box without needing to configure them manually. On the other hand, you can change these default settings anytime. Execute the "server" command to open a general help file (more help-related commands: "server firewall", "server httpd", "server mysql", and "server proxy").


Have fun :-)

Data recovery from partitions with bad blocks

$
0
0
4MLinux Rescue Edition (or 4MLinux Allinone Edition) can help you to recover data from partitions with read errors (bad blocks).

1. Choose Partition Wizard from the Maintenance Menu:



2. 4MLinux will download and install Partition Wizard for you:



3. Now you can check your partition with Partition Wizard (Surface Test):



4) If bad blocks are found, you can try to recover your data by choosing Partimage from the Maintenance Menu:




5) GNU ddrescue has been designed to recover data from partitions with read errors (bad blocks). You must be really patient, because the recovery process may last very long:

 


Good luck :-)

Very strange update procedure

$
0
0
As it was honestly stated here, 4MLinux does many things in its very special way. For example, you can force update of some applications by.... removing their executables from your system. Let's take SMPlayer as an example.

1) I am removing SMPlayer executable in Terminal:


2) Now I am selecting SMPlayer from the Multimedia Menu:


3) Fully automatic update process will be started:



The newest SMPlayer is now up and running!

Note:
The following applications can be updated in the way described above: 
/usr/bin/clamscan (Clam Antivirus)
/usr/bin/qupzilla (4MLinux QtPack)
/usr/bin/smplayer (4MLinux QtPack)
/usr/bin/smtube (4MLinux QtPack)
/usr/bin/wpagui (4MLinux QtPack)
/usr/bin/ooffice (Libre Office)
/usr/bin/pw (Partition Wizard)
/usr/sbin/cupsd (4MLinux Printing Suite)

Alien packages (deb, rpm, txz)

$
0
0
4MLinux (even in its basic version) is able to open huge amount of various archives (gzip, bzip2, xz, 7z, arc, zip, rar, ISO, ...). You can also view/open/install "alien" (i.e. not 4MLinux native) packages from Debian, Fedora, RH, Ubuntu, and Slackware (this feature is provided by a set of small scripts developed by 4MLinux). I will try to show this taking a Debian package as an example.

Note:
The procedure described below works in the exact same way for deb, rpm, and txz  packages.

1) Terminal. Execute 'mc' to open Midnight Commander, and double click on the file, which you want to open:




2) PathFinder. This is the default file manger in the basic version of 4MLinux. Just double click on the file, which you want to open:



 

3) X File Explorer. This is the default file manger in the full version of 4MLinux. Let's double click again:



Note:
In all the above examples you can see the same script in action (it chooses the best method to open the package by checking what applications are installed in your system).

4) It is also possible to install the package using your right mouse button:




Note:
4MLinux does not check any dependencies, meaning that it will install the package even if it leads to errors, so use this feature with caution.

P2P networking

$
0
0
4MLinux 8.0 (and later) supports peer-to-peer networking via rTorrent (powerfull BitTorrent client) and eMule (famous P2P file sharing application).

1) Torrents. You can use any of the file managers, which are included in 4MLinux. Just double click on your torrent file to start downloading with rTorrent:





2) eMule. 4MLinux uses Wine to run eMule:




3) Downloaded files. You will find your new files in the "Downloads" folder (used by both rTorrent and eMule):


That's it !

Java Runtime Environment

$
0
0
4MLinux 8.1 (and later) supports a fully automatic installation of the vanilla version of Java Runtime Environment. This is one of so called "downloadable extensions" (i.e. optional software in 4MLinux, which is installed in the /opt directory by default).

1) Select Java RE from the Extensions menu:

 

2) Default security settings in Java are curiously high nowadays. This why I recommend to change them from "High" to "Medium":




3) Now you have everything needed to run JAR and JNLP files. Just double click on the file, which you want to open. Let's take JAP (privacy generator) as an examlpe:


  Have fun :-)


 *****

Viewing all 51 articles
Browse latest View live