Linux Tools to see What Process consume Bandwidth

January 09, 2014
I have to day to day network troubleshoot and I need such a tool which shows what program consume the network bandwidth. So the Nethogs tool is small net top tool which fit exactly under my requirements. Here is the process to install and use of the tool.


The tool monitors traffic going to and from a machine, by per process basis.

jpudasaini@jpudasaini:~$ sudo apt-get install nethogs
 
*****Output*******

[sudo] password for jpudasaini:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  kde-l10n-engb linux-image-generic
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  nethogs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 28.3 kB of archives.
After this operation, 105 kB of additional disk space will be used.
Get:1 http://np.archive.ubuntu.com/ubuntu/ saucy/universe nethogs amd64 0.8.0-1 [28.3 kB]
Fetched 28.3 kB in 0s (50.1 kB/s) 
Selecting previously unselected package nethogs.
(Reading database ... 230384 files and directories currently installed.)
Unpacking nethogs (from .../nethogs_0.8.0-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up nethogs (0.8.0-1) ...
You have install the tool. How to use the tool.

#sudo nethogs
#sudo nethogs eth0

Open DNS Recursive Resolver Attack

January 02, 2014
Dear blog reader, few days back I have face a huge DNS Amplification/Reflection attack from Mikrotik (MT) router. The Attack has been organized from different source to different destination. 

This attack also has been seen in different vendor router like d-link di-1705b, Buffalo,AirLive, Cisco(Cisco Systems, Inc. Firmware: 4608)

The Attack is possible because of MT router apply following tcp and udp packet filter destination port 53.

 IP>firewall>filter rules
chain=input action=drop protocol=udp in-interface=ether1-WAN dst-port=53
chain=input action=drop protocol=tcp in-interface=ether1-WAN dst-port=53


Same rule can be maintain for other router to block and disable resolver.

Please Note: in-interface should be your WAN port.

How to check your IP is used as open resolver

Linux command

#dig -t A jpudasaini.com.np @8.8.8.8

Note: Replace 8.8.8.8 with your IP address


How to create VPN/PPTP server on Mikrotik RouterOS.

December 27, 2013
Dear Blog reader today I'm going to setup VPN/PPTP server for Mikrotik RouterOS. Its very easy to set it up. Just follow below tutorial.

Logical Diagram for this tutorial.



Step1:
Go the IP>Pool>
Give Pool for your VPN server IP address list. See below



 Step 2:
Now Click on PPP> Interface>PPTP server>
Now check Enable to enable the server


Step 3:
Go to profile>
Name:- Give name
Local Address:- choose what you name while creating POOL
Remote Address:- Same as Pool name
DNS:- Give free or given by your ISP



Step 4:
Click on Secrets>
Name:- This is a username to login to VPN server
Password:- Password for your username
Profile:- What you create previous in VPN profile.


Now your VPN server is ready to login. If your VPN profile need to internet access then add to NAT under firewall 
Go the firewall>NAT and add your IP address then masquerade VPN server IP address.

General>Chain>srcnat>src Address>10.10.10.0/29>Out Interface>WAN1>action>masquerade





Powerpoint Problem on Linux

November 12, 2013
I like Some features of Microsoft office, so I install office 2007 into kali linux. Everything work perfect but when I try to run power-point, it never run. Then I search for fixed and found one solution. This trick has been posted in ubuntuforum and works perfect to me.

Step 1. Got the Application>System tool>Wine configuration



Setp 2. Under Library tab Add these two overrides "riched20" and "usp10".

Setp 3. Apply and ok.

Now you can run the power-point with out error.