Network connection log

Asked by martino

I'm using ubuntu 9.10 and i'd like to know how to see the log of network connection with the port number
and IP address of the remote system.

Regards,

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
wojox
Solved:
Last query:
Last reply:
Revision history for this message
wojox (wojox) said :
#1

For what application?

For general stuff try:

sudo netstat -lntp

Revision history for this message
martino (lrinetti-libero) said :
#2

My interest is about the history (log) of the connections, not only the present ones.

Revision history for this message
wojox (wojox) said :
#3

There's also:

netstat -nr

-n means return numeric output (ie, IP address instead of hostname)

-r means print the routing table

find all open ports

netstat -a

find listening ports

netstat -l

There is no log unless your using a specific service/application.

Revision history for this message
martino (lrinetti-libero) said :
#4

There are some service/application i can install that may help me ?

Revision history for this message
Michael Lustfield (michaellustfield) said :
#5

/var/log/ If it's not there then your application isn't keeping the log.
Perhaps add a router in there that will keep logs for you? (pfsense)

Revision history for this message
Best wojox (wojox) said :
#6

If you have a router you can view ip addresses and port numbers through it.

Revision history for this message
martino (lrinetti-libero) said :
#7

Thanks wojox, that solved my question.