i am using libipq to queue packets to user space where i am doing my own natting and connection tracking and returning packets back to kernel. everything is working fine except with pppoe. i have two interfaces eth0 and eth1 on my linux mc. i startup pppoe which brings up ppp0 and bind it to eth0. To queue packets i make following iptable rules
iptables -t manlgle -A PREROUTING -j QUEUE
iptables -t nat -A POSTROUTING -j QUEUE
iptables -t nat -A OUTPUT -j QUEUE
iptables -A INPUT -j QUEUE
These rules queue packets for my userspace application.
my setup is like this--
client machine with gateway address of eth1 of my linux mc
linux mc with eth1 and eth0(ppp0)
adsl modem
from browser in client machine i send browse requset for say
www.google.com. it goes to eth1 of linux mc. prerouting hook catches the packet, accepts it. then postrouting hook picks it up and changes the source address to that of ppp0 and the packet goes out from ppp0. so far so good. the reply packet which comes back is not captured by any hook and gets dropped and the communication does not proceed. i have tried by giving ipaddress of google directly so that dns queries are skipped and tcp packets flow. but only sync is sent, sync ack comes back but it is dropped and reset is sent.
if i am not using pppoe every thing is working fine.
where i am wrong?