topology: 2 linux computer connected directly . no iptables rules (except - iptables -A OUTPUT -p tcp -j NFQUEUE ) no firewall.
route is defined as - "route add default dev eth0"
on the second one (192.168.1.1) run apache server .
I have a small program based on libnetfilter_queue that listen to the nfqueue and change the dst ip to 192.168.1.1 in case that the dst ip is 192.168.1.2 (i know that i can do it with iptables , but my program will do more things in the future), fix check sum and return to the queue.
if i call to telnet 192.168.1.1 , means that my program dosnt need to do any manipulation, handshake is OK. If i call to telnet 192.168.1.2 , my program change the dest. server get the syn and return syn-ack, but right after getting the syn-ack the client send rst.
Can anyone advice?