15

How can I check which applications are using internet? How to block internet accessing one particular application? Is there any GUI tool that exist for it in Ubuntu Software Centre? Thanks in advance!

Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407
Tachyons
  • 17,455

5 Answers5

19

lsof -i will list the applications that are accessing the network. There are some helpful examples in the man page but you might also want to look at Track network connections with LSOF on Linux.

10

I found very useful next command that show only the names of applications that use internet connection (create internet traffic) at the moment:

netstat -lantp | grep -i stab | awk -F/ '{print $2 $3}' | sort | uniq

Source: Show apps that use internet connection at the moment (Multi-Language).

Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407
6

To see which application is using data, try the NetHogs application from the eponymous package nethogs in Ubuntu’s “Universe” repository or from source.

David Foerster
  • 36,890
  • 56
  • 97
  • 151
2

In addition to lsof -i which will list applications that have open network sockets as Richard mentioned, you can also install ufw and gufw which are the Uncomplicated FireWall and the GUI program that manages it. I haven't used either of these since 8.04 since I mostly use ubuntu internal to my own network, but they should have options for that. iptables is also a very popular firewall.

Huckle
  • 7,258
1

You can get the list of listening applications by using UFW using the following command.

sudo ufw show listening