LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 05-30-2007, 03:49 AM   #1
simon_qwl
Member
 
Registered: Jul 2004
Posts: 34

Rep: Reputation: 15
Mornitoring passing-through packets on tha gateway


Hi all,
I am very curious about the approach to implement the following functions on a LAN gateway:
1)Monitor all passing-through packets
2)Fetch desired packets for certain operations
3)Send out the packets
Is there any approaches to achieve this or existing system to use?if i need write the system from scratch, where is the start point?should i write network driver?I have been confused by this for a while. Any advises are appreciated.TQVM.
 
Old 05-30-2007, 08:17 AM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Need more detail/example.
Are you trying to write your own firewall? (See iptables)
Are you trying to write a network (ie Sockets) program.
Why would you need to write this SW?
 
Old 05-30-2007, 08:39 AM   #3
simon_qwl
Member
 
Registered: Jul 2004
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by chrism01
Need more detail/example.
Are you trying to write your own firewall? (See iptables)
Are you trying to write a network (ie Sockets) program.
Why would you need to write this SW?
actually this SW works on RTP packets,here is the scenario:
when there are RTP media streaming passing through this gateway from two ends(one is in the LAN,another could be outside the LAN),then this SW needs to fetch those packets to do its job and only send RTP packets to destination.
Therefore I assume this SW needs to monitor the traffic on the GW. TQ.
 
Old 05-31-2007, 07:57 AM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Sounds like you want to only allow (filter through) RTP packets and block others?
If so, research IP Tables eg http://www.linuxguruz.com/iptables/howto/
or this is better: http://www.netfilter.org/
 
Old 05-31-2007, 11:16 PM   #5
simon_qwl
Member
 
Registered: Jul 2004
Posts: 34

Original Poster
Rep: Reputation: 15
Thanks for the info,i also got some advices on TUN/TAP approach. Do you familiar on them? which one is more efficient? Because the latency is a critical part on this SW.TQ
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
New in tha house cryonic90 LinuxQuestions.org Member Intro 3 03-25-2005 09:53 AM
passing passing variable in Java as reference djgerbavore Programming 3 11-10-2004 03:18 PM
No packets received at application-level without a default gateway urban_olofsson Linux - Networking 3 10-29-2004 09:51 AM
Logging\Filtering Packets Through a Gateway ASP Linux - Software 2 10-21-2003 11:11 PM
iptables- not passing packets to server jbrandis Linux - Security 4 12-09-2001 05:44 PM


All times are GMT -5. The time now is 07:19 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration