Zaid thanks, but you seem to misunderstood my point.

There are several ways you can actually intercept a packet (IP based
Which means udp,tcp, icmp...etc)
1)Driver Level, which means writing code that works closely with HW.
2)IP Filters and Interface Filters which his provided my M$ on NT plantform
and later.

I know how to deal with both methods, but none are acceptable in my case :s
So I know and have written a small program that sniffs the packets
And displahys them, i.e src,dst, port of each packet...etc

What I want to do is to say for example, stop all incoming packets if
They are on port 53 (dst port). All this using raw socket. Which is the
third
Method from the above two.
So in raw socket I have already done sniffing, now I need to
Be able to filter or block it rather than taking a copy of it.

Thanks

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Zaid Amireh
Sent: Tuesday, December 27, 2005 1:04 PM
To: Jordan Linux User Group Mailing list
Subject: Re: [JoLUG-General] A small qustion regarding RAW sockets

On 12/27/05, Fadi Kahhaleh <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi all,
>
>
>
> Is there a way to write a simple packet filter using raw sockets only??
>
> Linux or windows I won't mind.
>
> I have already done the work on sniffing the packet and seeing it.etc.
>
> But now I want to block it from reaching the user app. If its port xyz or
> from source
>
> 103.xxx.xxx.xxx.etc.
>
> I don't want to use IPFiltering interfaces or drivers. Can raw socket do
> it?? Are
>
> There any parameters.etc. I am using ioct_RCVALL currently as the
parameter.
>
> Thanks.
>
>
>
> Fadi .K


you want to filter on the tcp level yet not use it?
read the socket and decode the binary packet yourself then.



--
---------------------------
Netiquette -> http://www.dtcc.edu/cs/rfc1855.html
Netiquette Nazi ->
http://redwing.hutman.net/%7Emreed/warriorshtm/netiquettenazi.htm
---------------------------
_______________________________________________
General mailing list
[email protected]
http://mail.jolug.org/mailman/listinfo/general_jolug.org


_______________________________________________
General mailing list
[email protected]
http://mail.jolug.org/mailman/listinfo/general_jolug.org

Reply via email to