LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-15-2008, 04:09 PM   #1
helptonewbie
Member
 
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Rep: Reputation: 39
Question Trying to find how i can List/Graph/Statistics on network connections into my server?


Hello all,
As the question outlines, i'm trying to find something that could monitor really just network traffic in some way. So not necessarily including ip addresses and anything like that but just the number of connections to a port number specifically so I can monitor the number of incoming connections. I’ve just seen a website called ntop I’m going to look into some more but is there any other suggestions? I’ve pretty much ruled out something like netstat although I could make it fit the needs, it would be a bit static and only collect the connections when run, I’d like something a bit more dynamic and be able to draw a graph from the data, something like that?

Thanks Regards,
Me

ps - now also looking at zabbix, anything else out there you me does anyone think??

Last edited by helptonewbie; 06-15-2008 at 04:12 PM.
 
Old 06-16-2008, 02:23 AM   #2
eliufoo
Member
 
Registered: Oct 2007
Posts: 71

Rep: Reputation: 15
Hi,

Have you tried using Cacti (google it.) It useful tool to capture interface data and other related information provided by snmp. Cacti is a complete frontend to RRDTool, it stores all of the necessary information to create graphs and populate them with data in a MySQL database.
 
Old 06-16-2008, 03:38 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
I don't know how helpful this can be but can give Ethreal a try.
 
Old 06-16-2008, 04:11 AM   #4
TaigaIV
LQ Newbie
 
Registered: Jun 2008
Distribution: debian gentoo
Posts: 9

Rep: Reputation: 0
Packet analysis

Thanks for your advices, i preferer wireshark and tcpdump for packet anlysis.
Actually my problem is not capturing/analysing traffic but routing and NAT.

Regards,

Mathieu
 
Old 06-16-2008, 04:30 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
For routing and nating Guidedog can help you.
 
Old 06-16-2008, 04:53 AM   #6
TaigaIV
LQ Newbie
 
Registered: Jun 2008
Distribution: debian gentoo
Posts: 9

Rep: Reputation: 0
Little more informations

I advanced a bit, i can give now more informations and a new part of the problems.

I actually use two tap interfaces.

tap0 : 10.0.254.1 netmask 255.255.255.0
tap1 : 10.0.253.1 netmask 255.255.255.0

I created two entries in /etc/iproute2/rt_tables :
201 test.net1
200 test.net2


I created some iptables rules :
iptables -t mangle -A PREROUTING -d 10.0.254.0/24 -j MARK --set-mark 1
iptables -t nat -A PREROUTING -d 10.0.254.2 -j DNAT --to 172.21.1.69
iptables -t nat -A POSTROUTING -o tap0 -j SNAT --to 10.0.254.1


iptables -t mangle -A PREROUTING -d 10.0.253.0/24 -j MARK --set-mark 2
iptables -t nat -A PREROUTING -d 10.0.253.3 -j DNAT --to 10.1.0.1


And some ip rules :
ip rule del fwmark 1 table test.net1
ip rule add fwmark 1 table test.net1
ip route del default via 10.0.254.4 dev tap0 table test.net1
ip route add default via 10.0.254.4 dev tap0 table test.net1

ip rule del fwmark 2 table test.net2
ip rule add fwmark 2 table test.net2
ip route del default via 10.0.253.2 dev tap1 table test.net2
ip route add default via 10.0.253.2 dev tap1 table test.net2



From 10.0.253.2 i execute : ping 10.0.254.2
Packet never come back.

From the routeur point of view (where all this mess run), i get some informations
from tap1 :

11:45:35.753988 IP 10.0.253.2 > 10.0.254.2: ICMP echo request, id 53277, seq 8, length 64

from tap0 :

11:46:12.759495 IP 10.0.254.1 > 172.21.1.69: ICMP echo request, id 53277, seq 45, length 64
11:46:12.782288 IP 172.21.1.69 > 10.0.254.1: ICMP echo reply, id 53277, seq 45, length 64

And from kernel log something :
martian source 10.0.253.2 from 172.21.1.69, on dev tap0
ll header: 00:ff:ff:88:88:a1:00:ff:f5:cc:7c:74:08:00

I think when packet come back they are re-sent on tap0 after nat/prerouting. Any idea will be greatly welcome.

Thanks for reading.

Mathieu
 
Old 06-17-2008, 02:01 AM   #7
TaigaIV
LQ Newbie
 
Registered: Jun 2008
Distribution: debian gentoo
Posts: 9

Rep: Reputation: 0
Sorry all, i don't know why my post are here, i was posting in an other threads.
 
Old 06-17-2008, 01:12 PM   #8
coontie
Member
 
Registered: Jun 2003
Distribution: Fedora Core 5
Posts: 100

Rep: Reputation: 15
MRTG -- google for it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Network statistics Padawan.AVT Linux - Server 2 11-15-2007 10:59 AM
List Connections by Process? juanbobo Linux - Networking 3 05-30-2006 11:07 PM
compile dependency graph/list avr Slackware 1 12-19-2005 01:21 PM
Network Server List from port number C/C++ clinux_rulz Programming 5 12-18-2005 09:57 AM
trying to find the maximum in a 2 d matrice for graph coloring jacques83 Programming 2 11-14-2005 10:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration