Re: IPPROTO_RAW



In article
<725c6b52-301d-4ae0-bf5d-490399235091@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
lak <lakindia89@xxxxxxxxx> wrote:

On Jul 17, 6:57 am, Barry Margolin <bar...@xxxxxxxxxxxx> wrote:
In article
<ab289c53-4c47-4aa0-9f03-38161e271...@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,

lak <lakindi...@xxxxxxxxx> wrote:
Receiving of all IP protocols via IPPROTO_RAW is not possible using
raw sockets. Why?

Because some protocols, such as TCP and UDP, are handled automatically
by the network stack. When the stack receives a TCP or UDP packet with
a destination port that isn't open, it will send an error response back
to the sender.

Can you please explain a little more? please.

You use a raw socket to send out a TCP SYN packet with source port 5000
and destination port 80. The web server sends back a SYN-ACK with
source port 80 and destination port 5000. Since this is a TCP packet
the kernel passes it to the TCP driver. The TCP driver searches its
connection table looking for one with a local port 5000 and remote port
80. It can't find one, so it sends a RST packet, and this causes the
server to abort the connection.

--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.



Relevant Pages

  • Re: excessive TCP dulplicate acks revisted
    ... The tcp duplicate ACK attack is back. ... there was a thread on duplicate TCP acks in -CURRENT. ... TCP STREAM TEST from localhost port 0 AF_INET to greenhouse- george.18clay.com port 0 AF_INET ... Socket Socket Message Elapsed ...
    (freebsd-current)
  • excessive TCP dulplicate acks revisted
    ... The tcp duplicate ACK attack is back. ... there was a thread on duplicate TCP acks in -CURRENT. ... TCP STREAM TEST from localhost port 0 AF_INET to greenhouse- george.18clay.com port 0 AF_INET ... Socket Socket Message Elapsed ...
    (freebsd-current)
  • Re: Windows ControlAd experience this morning
    ... TCP non-syn/non-ack packet on invalid connection. ... TCP Destination Port: 3665. ... OrgTechName: Network Operations ...
    (alt.computer.security)
  • Re: UDP catchall
    ... This is a kind of port knocking. ... Thanks to TCP ... If an RST packet is generated in response to the first TCP SYN packet, ... there might be no retransmission as the sender would think the TCP ...
    (freebsd-net)
  • Re: Problem with Port forwarding, NATD and IPFW
    ... You need some more knowledge to understand how TCP works. ... sender, port of sender, receiver, port of receiver. ... So there will be never a packet matching to this rule. ... Back to your problem with natd. ...
    (comp.unix.bsd.freebsd.misc)