title: How to set linux kernel not to send RST_ACK, so that I can give SYN_ACK within raw socket
body: <p>I want to ask a classic question about raw socket programming and linux kernel TCP handling. I've done the research to some same threads like <a href="https://stackoverflow.com/questions/1606004/linux-raw-socket-programming-question">linux raw socket programming question</a>, <a href="https://stackoverflow.com/questions/4442060/how-to-reproduce-tcp-protocol-3-way-handshake-with-raw-sockets-correctly">How to reproduce TCP protocol 3-way handshake with raw sockets correctly?</a>,  and <a href="https://stackoverflow.com/questions/6441739/tcp-ack-spoofing">TCP ACK spoofing</a>, but still can't get the solution.</p>
  
  <p>I try to make a server which don't listen to any port, but sniff SYN packets from remote hosts. After the server do some calculation, it will send back a SYN_ACK packet to corresponding SYN packet, so that I can create TCP Connection manually, without including kernel's operation. I've create raw socket and send the SYN_ACK over it, but the packet cannot get through to the remote host. When I tcpdump on the server (Ubuntu Server 10.04) and wireshark on client (windows 7), the server returns RST_ACK instead of my SYN_ACK packet. After doing some research, I got information that we cannot preempt kernel's TCP handling. </p>
  
  <p>Is there still any other ways to hack or set the kernel not to responds RST_ACK to those packets? 
  I've added a firewall to local ip of server to tell the kernel that maybe there's something behind the firewall which is waiting for the packet, but still no luck</p>