Basics of Firewalls in Linux

What is a Firewall?

Just as a firewall in a building attempts to prevent a fire from spreading, a computer firewall attempts to prevent malicious or unwanted software from spreading to your computer from the network.

A Firewall also helps to prevent unauthorized users from accessing your computer.

In a default Linux installation, a firewall exists between your computer or network and any untrusted networks, for example the Internet. It determines which services on your computer remote users can access. A properly configured firewall can greatly increase the security of your system.

It is strongly recommended that you configure a firewall for any system with an Internet connection properly, to secure your computer from malicious software and external attackers.

In our next post we would like to throw some light on the ways to configure a firewall on various popular flavours of Linux.

Monitor network usage in Ubuntu

Many a times when we are using our computer for surfing the internet, or other network activities, we feel that though we have a good internet connection, but the browsing speed is not good.

It may happen so that the bandwidth is being consumed by some unwanted application or process running in the background and little or no bandwidth is left for the browser.

But how can we diagnose which application is making how much usage of the internet bandwidth?

Luckily there is a small application available for Ubuntu which does the real time monitoring of the internet bandwidth usage and displays it for you on the screen. The application is “NetHogs”.


 

For installing use the following steps:-

  • Open a new terminal window using key combination Ctrl+Alt+t
  • On the command prompt issue the command :- sudo apt-get install nethogs
  • After the installation is over, just issue the command :- sudo nethogs
  • Real time data usage of the network will be displayed in the terminal
  • To close the application use key combination Ctrl+c

Once you have the details of the applications or processes hogging you bandwidth, you can close them or selectively kill them.

 

Create WiFi Access Point On Ubuntu

Have you got a computer with a wired internet connection and a wireless LAN card available and you want to connect your wi-fi enabled devices to internet, then here is a solution to create a Wi-Fi Access point using your computer. Hence you can share your single internet connection with multiple devices, as well as have the flexibility of internet access on the go.

It is assumed that you are having the following available with you:
(a) A computer running Ubuntu operating system (we used 14.04 LTS for this setup).
(b) A wired internet connection.
(c) A wireless LAN card.

For the purpose of creating a hotspot or access point we will utilise ap-hotspot software.

First of all install ap-hotspot as follows.

(a) Open a new terminal from dash or use keyboard shortcut “ctrl+alt+t”.
(b) Issue the following commands in sequence:

sudo add-apt-repository ppa:nilarimogard/webupd8

sudo apt-get update

sudo apt-get install ap-hotspot

(c) After the installation is a success, issue following command to configure the hotspot or access point:

sudo apt-hotspot configure

It will detect your network connections and if all is correctly listed, it will ask you to enter an Access Point name (SSID) and access key (WI-Fi password).

(d) After above step we are ready to start our hotspot or access point. To start the hotspot issue the following command in the terminal:


sudo apt-hotspot start

(e) To stop the hotspot, issue the following command:


sudo apt-hotspot stop

Happy internet connection sharing with your wireless devices.