* Libipq Help!! How to steal UDP traffic?
@ 2005-01-22 21:26 Guilherme Cesar Soares Ruppert
2005-01-25 0:10 ` Guilherme Cesar Soares Ruppert
2005-01-25 0:12 ` Guilherme Cesar Soares Ruppert
0 siblings, 2 replies; 4+ messages in thread
From: Guilherme Cesar Soares Ruppert @ 2005-01-22 21:26 UTC (permalink / raw)
To: netfilter-devel
Hi everyone, please I need some help!!
I'm developing a program that needs to intercept an UDP traffic generated
locally by another application. It's like a tunnel. My program will
steal the outgoing packets from the application (in the same machine) and
will send to a tcp tunnel.
I am using Libipq to do that, but I have a BIG problem. After send the
UDP packets to my tunnel, I need to DROP the packets because I don't want
them to be sent over the network. So I am doing:
ipq_set_verdict(handle, m->packet_id, NF_DROP, 0, NULL);
But the problem is that when I drop the packet, the application that
generated the packet remains blocked in sendto() until the packet is
accepted. When I change to NF_ACCEPT, the application doesn't block but
the packets are sent to the network and I don't want it.
How could I drop a packet silently, without blocking the application? Is
there any way to intercept outgoing packets locally without let the
applications notice that their packet were stolen?
Here is the same example using netcat:
$ iptables -A OUTPUT -p udp -j QUEUE
$ echo "Test" | nc -n -u 10.1.1.23 800
And this last remains blocked, not returning to shell.
I tested will ping (icmp echo) also and the same happened, but ping didn't
block. Instead, it said "operation not permitted".
Please give me some hope!!! :-)
Thanks
Guilherme Ruppert
^ permalink raw reply [flat|nested] 4+ messages in thread
* Help!! How to steal UDP traffic?
2005-01-22 21:26 Libipq Help!! How to steal UDP traffic? Guilherme Cesar Soares Ruppert
@ 2005-01-25 0:10 ` Guilherme Cesar Soares Ruppert
2005-01-25 0:12 ` Guilherme Cesar Soares Ruppert
1 sibling, 0 replies; 4+ messages in thread
From: Guilherme Cesar Soares Ruppert @ 2005-01-25 0:10 UTC (permalink / raw)
To: netfilter-devel
Hi everyone, please I need some help!!
I'm developing a program that needs to intercept an UDP traffic generated
locally by another application. It's like a tunnel. My program will steal the
outgoing packets from the application (in the same machine) and will send to
a tcp tunnel.
I am using Libipq to do that, but I have a BIG problem. After send the UDP
packets to my tunnel, I need to DROP the packets because I don't want them to
be sent over the network. So I am doing:
ipq_set_verdict(handle, m->packet_id, NF_DROP, 0, NULL);
But the problem is that when I drop the packet, the application that
generated the packet remains blocked in sendto() until the packet is
accepted. When I change to NF_ACCEPT, the application doesn't block but the
packets are sent to the network and I don't want it.
How could I drop a packet silently, without blocking the application? Is
there any way to intercept outgoing packets locally without let the
applications notice that their packet were stolen?
Here is the same example using netcat:
$ iptables -A OUTPUT -p udp -j QUEUE
$ echo "Test" | nc -n -u 10.1.1.23 800
And this last remains blocked, not returning to shell.
I tested will ping (icmp echo) also and the same happened, but ping didn't
block. Instead, it said "operation not permitted".
Please give me some hope!!! :-)
Thanks
Guilherme Ruppert
^ permalink raw reply [flat|nested] 4+ messages in thread
* Help!! How to steal UDP traffic?
2005-01-22 21:26 Libipq Help!! How to steal UDP traffic? Guilherme Cesar Soares Ruppert
2005-01-25 0:10 ` Guilherme Cesar Soares Ruppert
@ 2005-01-25 0:12 ` Guilherme Cesar Soares Ruppert
2005-01-25 10:29 ` George Alexandru Dragoi
1 sibling, 1 reply; 4+ messages in thread
From: Guilherme Cesar Soares Ruppert @ 2005-01-25 0:12 UTC (permalink / raw)
To: netfilter
Hi everyone, please I need some help!!
I'm developing a program that needs to intercept an UDP traffic generated
locally by another application. It's like a tunnel. My program will steal the
outgoing packets from the application (in the same machine) and will send to
a tcp tunnel.
I am using Libipq to do that, but I have a BIG problem. After send the UDP
packets to my tunnel, I need to DROP the packets because I don't want them to
be sent over the network. So I am doing:
ipq_set_verdict(handle, m->packet_id, NF_DROP, 0, NULL);
But the problem is that when I drop the packet, the application that
generated the packet remains blocked in sendto() until the packet is
accepted. When I change to NF_ACCEPT, the application doesn't block but the
packets are sent to the network and I don't want it.
How could I drop a packet silently, without blocking the application? Is
there any way to intercept outgoing packets locally without let the
applications notice that their packet were stolen?
Here is the same example using netcat:
$ iptables -A OUTPUT -p udp -j QUEUE
$ echo "Test" | nc -n -u 10.1.1.23 800
And this last remains blocked, not returning to shell.
I tested will ping (icmp echo) also and the same happened, but ping didn't
block. Instead, it said "operation not permitted".
Please give me some hope!!! :-)
Thanks
Guilherme Ruppert
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help!! How to steal UDP traffic?
2005-01-25 0:12 ` Guilherme Cesar Soares Ruppert
@ 2005-01-25 10:29 ` George Alexandru Dragoi
0 siblings, 0 replies; 4+ messages in thread
From: George Alexandru Dragoi @ 2005-01-25 10:29 UTC (permalink / raw)
To: Guilherme Cesar Soares Ruppert; +Cc: netfilter
Why not MARK-ing it with iptables and send it to the tunnel with iproute ?
On Mon, 24 Jan 2005 22:12:04 -0200 (BRST), Guilherme Cesar Soares
Ruppert <ruppert@las.ic.unicamp.br> wrote:
>
>
> Hi everyone, please I need some help!!
>
> I'm developing a program that needs to intercept an UDP traffic generated
> locally by another application. It's like a tunnel. My program will steal the
> outgoing packets from the application (in the same machine) and will send to
> a tcp tunnel.
>
> I am using Libipq to do that, but I have a BIG problem. After send the UDP
> packets to my tunnel, I need to DROP the packets because I don't want them to
> be sent over the network. So I am doing:
> ipq_set_verdict(handle, m->packet_id, NF_DROP, 0, NULL);
>
> But the problem is that when I drop the packet, the application that
> generated the packet remains blocked in sendto() until the packet is
> accepted. When I change to NF_ACCEPT, the application doesn't block but the
> packets are sent to the network and I don't want it.
>
> How could I drop a packet silently, without blocking the application? Is
> there any way to intercept outgoing packets locally without let the
> applications notice that their packet were stolen?
>
> Here is the same example using netcat:
> $ iptables -A OUTPUT -p udp -j QUEUE
> $ echo "Test" | nc -n -u 10.1.1.23 800
> And this last remains blocked, not returning to shell.
>
> I tested will ping (icmp echo) also and the same happened, but ping didn't
> block. Instead, it said "operation not permitted".
>
> Please give me some hope!!! :-)
>
> Thanks
>
> Guilherme Ruppert
>
>
--
Bla bla
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-01-25 10:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-22 21:26 Libipq Help!! How to steal UDP traffic? Guilherme Cesar Soares Ruppert
2005-01-25 0:10 ` Guilherme Cesar Soares Ruppert
2005-01-25 0:12 ` Guilherme Cesar Soares Ruppert
2005-01-25 10:29 ` George Alexandru Dragoi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.