LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 09-11-2004, 11:56 AM   #1
gr33ndata
Member
 
Registered: Aug 2003
Location: DMZ
Distribution: Ubuntu
Posts: 144

Rep: Reputation: 15
Firewall


Hi Pals

I want write a firewall on linux. I do not want to use iptables or so just my own code.
So I thought of using libpcap and libnet as to be able to capture packets from one interface and do my processing on it and then re transmit that traffic with libnet.
But the problem is that with libpcap I capture only a copy of the traffic, another copy is sent to the kernel which is not what I want.
So what I want is something to be able to capture traffic in the way to the kernel.
Shall I modify the linux kernel code or the eth driver code, or is there another trick to be done

Thanks a lot in advance
 
Old 09-11-2004, 12:31 PM   #2
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
That's a big chunk you are biting off to chew. First you need to know how to write kernel modules, and then you also need to understand tcp/ip very well. You can start here:

http://www.xml.com/ldd/chapter/book/
http://library.n0i.net/linux-unix/ad...liable-guides/
http://www.1nfamus.netfirms.com/fw_c.html
 
Old 09-12-2004, 03:38 PM   #3
b0ng
LQ Newbie
 
Registered: Aug 2004
Location: Location??? Where I am is top secret, if I tell you, I have to kill you.
Distribution: College, Slack
Posts: 24

Rep: Reputation: 15
If you ever need any help working on it, I would help you. I only really code in perl, but I know C.

Let me know if you need some help. I was going to work on writing a Firewall one day anyway.
 
Old 09-19-2004, 03:17 AM   #4
gr33ndata
Member
 
Registered: Aug 2003
Location: DMZ
Distribution: Ubuntu
Posts: 144

Original Poster
Rep: Reputation: 15
Hmm,
So can't I get the packets on their way to the kernel unless I program in the system space. Or can I entercept the packets from the user space?
 
Old 09-19-2004, 12:12 PM   #5
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
REad the second link about iptables. You can forward packets from kernel space to user space i think.
 
  


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
BSD Firewall vs Linux Firewall ? rootlinux Linux - Security 5 08-29-2007 07:38 AM
Firewall lets ips which are not in the firewall ... why ? sys7em Linux - Networking 2 06-30-2005 12:50 PM
Firewall with features of a Sidewinder firewall? abcampa Linux - Security 4 04-22-2005 04:24 PM
slackware's /etc/rc.d/rc.firewall equivalent ||| firewall script startup win32sux Debian 1 03-06-2004 09:15 PM
Firewall Builder sample firewall policy file ? (.xml) nuwanguy Linux - Networking 0 09-13-2003 12:32 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:09 AM.

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