Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Thursday, February 24, 2011

Firewalls in Ubuntu -- details and configuration

Ubuntu Linux has mainly two strong firewalls, namely:
  1. Netfilter
  2. Firestarter

Netfilter firewall:

Ubuntu has a powerful firewall called netfilter that is part of the central kernel program. The ufw command at the terminal allows us to configure the firewall. However, this command needs you to be root of the system. For this purpose, we add sudo in before the command. For example, to enable the netfilter firewall we type the command as: sudo ufw enable. The manual pages for this firewall can be seen by typing the command: man ufw
However, this firewall can be operated in a more user-friendly way, by installing the package named Firewall Configuration. This package supports common tasks such as allowing or blocking pre-configured, common p2p, or individual ports, and many others. Rules can be easily added, removed and edited with the help of this interface. The interface is simple with easy usage and is recommended for beginner users.


We can configure the netfilter firewall by --
  1. Adding allow, deny and limit rules.
  2. Enabling, disabling and reloading the firewall.
  3. Deleting and Inserting rules.
  4. Displaying the information and status of the firewall.

Firestarter firewall:


Another user-friendly Firewall in Ubuntu is Firestarter. On the start-up for the first time, a wizard will be run, for configuring the network states. You can read the manual pages of this firewall by the command: man firestarter. There are three pages/tabs in the Firestarter interface, namely --
  1. Status page giving an overview of the firewall state. 
  2. Events page, where blocked intrusion attempts and the firewall history is shown.
  3. Policy page for altering the behaviour of the firewall.


This firewall can be in one of these three states: Active, Disabled and Locked (Nothing is allowed through the firewall, neither in nor out). The Network section of the status page gives an overview of the network resource usage. In addition, the status page also lists the Active connections, the firewall is tracking every moment. The entries in the Active connections are color coded as: Gray for a terminated connection and black for a currently active connection. However, terminated connections are removed from the list after 10 seconds.
The Events page shows the history of connections blocked by the firewall. The entries in the Events page can be allowed connections from source, port or everyone or can be disabled events from source or port. The Firestarter colour codes the entries as:
  1. Black -- A regular connection.
  2. Red -- A possible attempt to access a non-public service and needs special attention.
  3. Gray -- Harmless connections, mostly broadcast.

The third page, Policy can add, edit or remove rules for the firewall. Two types of rules can be created: Inbound rules, that allow through connections from the network or Internet, and Outbound rules, that can block unauthorised data emissions from your computer, such as those from potential virus infections, or spyware. Inbound rules allow you to filter all incoming connections. When it comes to blocking data emanating from your computer, Firestarter can enact two different modes:
  1. Whitelist: In this mode, network traffic is not allowed out of the computer unless a rule allows it. This is also known as restrictive policy. 
  2. Blacklist: In this mode, which is default, all traffic is allowed out of the computer unless a rule specifically forbids it. This is also known as permission policy.

Thursday, February 3, 2011

Ubuntu -- Analysis of the versions 8, 9 and 10

Ubuntu, a variant of Linux is continuously making its mark in the race among the operating systems as advancements are being made continuously with respect to many operating system aspects. I found huge advancements in regions such as GUI, CPU Utilisation, Networking, booting time etc. though some features were getting down. The Ubuntu Operating system versions will be released in the April and October months of every year with advancements made in some operating system aspects.

The versions and the code names of Ubuntu are given below:

8.04          HARDY HERON
8.10          INTREPID IBEX
9.04          JAUNTY JACKALOPE
9.10          KARMIC KOALA
10.04        LUCID LYNX
10.10        MAVERICK MEERKAT


The Ubuntu versions 8.04 and 8.10 had nothing to talk much about them. The software packages were not efficiently run besides the high CPU utilisation. The security settings were also not that strong. Networking was not good and connection to Internet through DSL was not present in Ubuntu 8.04. The look and feel was not appealing and the dependencies had to be looked after every now and then while installing the software packages. The Web Browser consumed much of the CPU resources when it was running, making it uncomfortable to use.

The Ubuntu versions 9.04 and 9.10 started using ext4 file system which made them to reduce the boot times three times than that of the 8.10 version. These versions boot in 25 seconds much better than the 65 seconds taken by the previous version (8.10). With the same, it managed to efficiently improve the system performance. These versions also made the look and feel better by introducing an absolute candy for notification purposes. The Empathy Instant messenger came into play with the version 9.10. The wireless network support was included in the 9.04 version. However, the network applet had some bugs, which made the connection to Internet (Wired using DSL) difficult. Besides all this, the Jaunty Jackalope newly had Tablet and Netbook support.


I should say that Ubuntu 10.04 and Ubuntu 10.10 are the best which we are having at present. These versions take only 10 seconds for the booting purpose, much better than the previous releases (25 seconds in the previous releases). In addition to the booting time, the software seemed to start quickly. The GUI has changed suddenly and the default theme settings are appealing to the eyes. The Internet got very much slowed down in Ubuntu 10.04 but all those major issues in Ubuntu 10.04 have been rectified now. The security settings are improving version after version in Ubuntu. I can find a lot of difference in the security in Ubuntu 8.10. The Ubuntu Software Center has undoubtedly become charming and more handy than ever, especially in the categorisation of the software. I should say, users had to face a bit of problem with the dependencies, broken links earlier; but now everything is managed so well by the Ubuntu software center, making it more user-friendly. Apart from this, the Instant messaging has added the new features of audio and voice chatting using Empathy Instant Messenger. I found that when the system files are being accessed, the system was taking so much time and was consuming large amount of CPU (almost 90% of CPU utilisation). This is the case when we open it in the GUI. The situation is however different when accessed through the Linux terminal. The authentication is a bit slow in Ubuntu 10.10 even though it was alright in Ubuntu 10.04.

Friday, January 14, 2011

MacBuntu and Compiz effects --Make Ubuntu look like Mac OSX

After a long gap, I have something interesting for you. The first part is to make Ubuntu look like Mac OS-X and the next part giving you some of the very interesting features of Compiz which I tried.

Unlike the earlier editions of Ubuntu which had a very dry default theme, the latest versions 10.04 and 10.10 have an interesting theme by default. Ubuntu must have definitely looked into this aspect and the booting process. The booting process is so fast that it takes hardly 20 seconds for the booting to take place. On the other hand, the Internet speed also has increased reasonably well over the Lucid Lynx (which had disastrously slow Internet). However, the look and feel of Mac-OS is top-class with glossy finishes and high resolutions.




How to make Ubuntu look like Mac OS X:


In order to get the Mac look-and-feel, a package named "Macbuntu" has to be installed. The process for the installation is given below:
  1. Download the Macbuntu package from the links given below:
    • https://downloads.sourceforge.net/project/macbuntu/macbuntu-10.04/v2.2/Macbuntu-10.04.tar.gz for Lucid Lynx (Ubuntu 10.04).
    • https://downloads.sourceforge.net/project/macbuntu/macbuntu-10.10/v2.3/Macbuntu-10.10.tar.gz for Maverick Meerkat (Ubuntu 10.10).
  2. After changing the present working directory to the folder which contains the downloaded file, extract the contents inside this compressed file to /tmp folder by using the following commands in the Terminal:
    • tar xzvf Macbuntu-10.10.tar.gz -C /tmp
    • cd /tmp/Macbuntu-10.10/
    • ./install.sh
  3. In the steps that follow the installation, give the  appropriate values to the questions at each stage.
  4. Now restart your system to get the new look-and-feel of Mac OS.


Compiz Settings:


Getting to the later part of the discussion,  Compiz effects are something that anyone would like to have for better animations, extras, effects, Window management, Utility, Desktop effects etc.

The things I tried in Compiz are pretty easy ones and Desktop cube, cube reflection and deformation, Scale and Negative are the ones that I predominantly used. 

The negative  plug-in does get the negative version of the environment which we are working on. 


The Scale plug-in gives a list of all the windows maximised at the center of the screen just giving some amazing desktop eye candy as shown in the figure below. It is always handy to have these kinds of plug-ins.


The Wobble windows plug-in though is a good piece, seemed to be an unstable one as far as the look in the environment and the wobbling to the eyes are concerned. Among the others, all the plug-ins related to Cube are a treat to the eyes. But one should see that the performance does not get disappointed when you have an extra set of these animations enabled. Cube Atlantis and Cube gears are master-pieces in this section but demand very good hardware all around.

A balance between the performance and the look-and-feel  is the one we should look at because an operating system is not solely about the look-and-feel. Therefore, it is always recommended to think for a while before switching to high graphic oriented plug-ins.

Friday, August 20, 2010

Text mode Web Browsers in Ubuntu

Ubuntu Linux has Mozilla Firefox as its default web browser. But, I feel among the modern web-broswers, Chromium Web Browser (Google Chrome) works better than Firefox as far as Ubuntu is concerned. Mozilla Firefox gives slow Internet on Lucid Lynx (Ubuntu 10.04). However, this problem seems to be solved as Maverick Meerkat (Ubuntu 10.10) has come up with a nice fast Internet. Now, coming to the actual discussion, Ubuntu has two types of web-browsers predominantly which are listed below:
  1. Graphical-based Web Browsers
  2. Text-based Web Browsers
There are two text based web browsers that I mainly used:
  1. ELinks Web Browser
  2. Links Web Browser 

ELinks Web Browser:


The ELinks Web Browser supports only text based browsing and pictures are not displayed. ELinks is a feature-rich program for browsing the web in text mode.  It is like enhanced Lynx and Links. The navigation of the web pages is done through space (Page Down) and b (Page Up); Up and down arrows predominantly. Remember that this browser accommodates the contents of a website much like the "more" in UNIX. The URL of the currently viewed web page is not seen anywhere in the browser. When you click on the upper part of the Browser you get the menu bar.




Links Web Browser:


Links is a graphics and text mode WWW browser, similar to Lynx. It displays tables, frames, downloads on background, uses HTTP/1.1 keepalive connections. In graphics mode it displays PNG, JPEG, GIF, TIFF, and XBM pictures, runs external bindings on other types, and features anti-aliased font, smooth image zooming, 48-bit dithering, and gamma and aspect ratio correction. But the content is not well-organized a handicap when compared to the contemporary Web Browsers. The navigation is similar to the way as it is in other web browsers. The URL is shown at the top-right of the window. Take a look at the Yahoo home page viewed in the Links Web Browser.

Thursday, August 19, 2010

Switching between the X Window mode and the Command-line mode

Not many would like to work with the command-line in Linux (Ubuntu), but there may be a few geeks who want to try the command-line to really learn the commands. The third type of users want to use both the X-Window mode and the Command-line mode. The present post is specially targeted to such a kind of users.

To go to the command-line mode from the X window system, press the keys Ctrl+Alt+(F1-F6). Any one of the Function keys in between F1 and F6 is alright. Now for suppose, you want to switch to the graphical mode (X Window system) for some purpose, you can do with an easy shortcut Ctrl+Alt+F7.
   Switching from X window mode to command-line mode -- Ctrl+Alt+(F1-F6).
   Switching from command-line mode to X window mode -- Ctrl+Alt+F7.

main() function called inside main() definition --- C Language

Many think that when the main() function call inside the main(), recursion goes on infinite times. But it is not true as such. It is always  important to know how function calling and recursion works. The function calls work with the help of a stack by PUSHing all the functions to a stack and POPing the functions from the stack when they are executed. The following figure gives the complete picture of this working. When a function "func1()" is called from within the "main()" method, the "func1()" is PUSHed onto the stack. Similar is the case with the function "func2()". When the function "func2()" gets completed, it is POPed from the stack. The function calls take place until the stack overflow occurs, that is until the stack is completely filled with the functions. This implies that the recursion without a suitable condition takes place not infinite times but stack size times.
   

This particular experiment when conducted, compiles successfully but it suffers from a run time error.

Lets have a look at the functionality of this entire concept and thus decide the output of the program. We also experiment on the number of times the function is called. The entire simulation is with the help of a simple program as given below:

#include "stdio.h"
int i=0;
int main()
{
            i++;
            printf(" %d\n",i);
            main();           /* Call main() inside main() */
            return 0;
}

Now,in the above program the value of "i" signifies the number of times the function is called.

First, I considered running this program on Turbo C on Windows platform, where the size of a variable of type "int" is 2 bytes. When I ran this program, the function got called around 15000 times and then the compiler crashed with the error message in the image shown below:
The next time I tried the same program on GNU C compiler on Ubuntu 10.04, where the size of a variable of type "int" is 4 bytes. Now when the program is compiled, it returned successful compilation.



But when it is run, a runtime error was issued as "Segmentation fault". The error message in the dialog box for Turbo C also indicated the same thing.

Now what is this segmentation fault? It is an error that occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to access a memory location in a way that is not allowed. It occurred in this case due to the stack overflow. So, main() called inside main() gives segmentation fault.

The number of times the function call took place varies continuously between two executions of the program. In Turbo C, the number of times the function call took place is around 16000 while in GNU C Compiler, this figure is around 327000.

Friday, July 30, 2010

Making Internet faster in Ubuntu 10.04

Many Ubuntu users have complained that the Internet is slow in 10.04 Lucid Lynx. If this is the case with you too, then follow the steps given below:
  1. Try another browser preferably Chromium Web Browser (Google chrome) from the Ubuntu Software Center. Slow Internet is a problem especially in Mozilla firefox and not in other Web Browsers.
  2. If you want to stick to Mozilla Firefox only, then type in the address bar: "about:config" and then make some changes in the configurations:
  • First disable IPv6 in Firefox. Disabling IPv6 allows you fast Internet. Type the text in the filter as "network.dns.disableIPv6" and set the value to TRUE.
  • Similarly, type in the Filter, "network.http.pipelining" and set its value to TRUE. Now type "network.http.proxy.pipelining" in the Filter and set its value to TRUE.
  • Now the last thing to modify in the configurations is to search for "network.http.pipelining.maxrequests" and change the maximum requests to 8 or 10.
     You are done with it. Now enjoy fast Internet.

Saturday, July 24, 2010

Time mismatch could be expensive in Ubuntu 10.04.

Set your system time correctly and give necessary details including your location so that you would not get worried with this particular issue. Ubuntu 10.04 has got something very irritating as it is robust with the match between the system time and the actual time.

When I got my Ubuntu 10.04 reinstalled, this particular aspect just made me worry a bit. I ignored the system time and wanted to install some essential softwares. So, far so good, but now started the actual trouble. There was no "Install" button/option available for the softwares in the "Ubuntu software center". The softwares can be installed from archive files after downloading the files from the respective websites. But that just is not easy as many installations in Ubuntu are difficult unless they are the debian packages. Going with the software center reduces both your time and effort. I was cornered with "Install" button not provided as I couldn't find the reason for this. Upto some half an hour or so, I could not install anything onto my Ubuntu system. I then left it aside and changed my system time to the actual time. Then, when I restarted Software center I was able to download the softwares without any problem as "Install" option reappeared.

There are some other disadvantages if you don't set the time correctly.
  1. Slow Internet --- I must say dead slow. It took about one and a half minute to open "google.com".
  2. Full System utilization even though the system is idle not doing any job. The system monitor showing the processor status to be 100% in use even though it is not used.
So, beware with this very disadvantage of Ubuntu. Double-check your system time.

Thursday, July 1, 2010

Shortcut to logout from Ubuntu

              You can logout of Ubuntu 10.04 just by hitting Ctrl + Alt + Backspace. But this has to be enabled to be used for killing the X-server. For this purpose, the following rules have to be followed in sequence:
  • Select “System”->”Preferences”->”Keyboard”.
  • Select the “Layouts” tab and click on the “Layout Options” button.
  • Select “Key sequence to kill the X server” and enable “Control + Alt + Backspace”.
You are done with this new shortcut.

Controlling the system while you are on Ubuntu

Any Windows user would suggest to hit Ctrl + Alt + Del which opens the Windows Task manager when an application becomes unresponsive. This manager contains the information of the running tasks, processes, networking and so on.

Similarly, in Ubuntu also we have such a manager which gives the details of various aspects like processes, networking etc., In Ubuntu, it is called "System Monitor". When an application becomes unresponsive in Ubuntu, then I would suggest you to use one of these methods:
  1. Goto System -> Administration -> System Monitor and kill the process which is unresponsive.
  2. Open Application -> Accessories -> Terminal and type "killall " and you are done with it.
  3. Use "Force Quit" applet.

What's not so good in Ubuntu 10.04

I have mentioned the new things that are added in Ubuntu 10.04. On the flip side, I felt some of the features were missing from the previous editions.

The first thing is lack of default support for editing images. It has definitely got F-Spot Photo Manager which can manage picture editing to a certain extent. But the powerful "Gimp"  is missing. This piece of software was included in the previous versions of Ubuntu, by default.

The second thing is the Ubuntu software center. It has improved a lot over the previous versions especially in the categorisation of software. But the exact detailed status is not shown while a software is being downloaded and installed. For example, the information about a software such as the space it occupies are not known to the user.

Wednesday, June 23, 2010

What's new in Ubuntu 10.04

I found these very much interesting in Ubuntu 10.04 over the previous versions.

1. Security:
                    The security levels in Ubuntu 10.04 have been increased. Firstly, a "root" account cannot be created under any circumstances, thus forcing us to use only the normal account. However, we can make installations using that. But a direct "root" account is not available.
                 
2. Messaging:
              I think this field has got a wide improvement over the previous versions. It makes audio and video calling very easy. In addition to this, Social Gibber client is also installed by default, to view microblogs such as twitter and other social networking sites.

3. Networking:
                     I found networking has improved over Ubuntu 9.10. This previous version only had connection through Internet by command line. There are bugs in Network Manager in Ubuntu 9.10 especially when connecting by DSL. But these bugs are rectified in Ubuntu 10.04.

4. Startup:
                Startup time has decreased and the operating system loads within no time. Quick startup definitely gives it an extra edge over the previous versions. Other softwares also seemed to start in quick time.

5. Games:
                   The games have also been changed. There are more logical games than the other conventional card and arcade games.

6. Other improvements:
  • Open Office 3.2 is used in this operating system. It starts very quickly and has many additional options over the previous versions.
  • Graphics drivers are installed automatically along with the operating system.
  • The new sound recorder is working well. There were some bugs in Ubuntu 8.10.
  • "Add or Remove programs" has been changed to "Ubuntu Software Center", leading to better categorization. The default programs can also be removed from the system, while this was not possible in Ubuntu 8.10.
Related Posts Plugin for WordPress, Blogger...