All of lore.kernel.org
 help / color / mirror / Atom feed
* Routing packets via a C program
@ 2007-01-22  8:58 Luca Bedogni
  2007-01-27 14:55 ` Jan Engelhardt
  0 siblings, 1 reply; 5+ messages in thread
From: Luca Bedogni @ 2007-01-22  8:58 UTC (permalink / raw)
  To: netfilter

Hi all
	i'm writing down a simple program for routing the packets manually.
The idea is:
if a packet comes from a specific IP (192.168.0.2) I set ip->saddr to my ip 
and then accept it. And, if a packets comes from the outside, i set ip->daddr 
to 192.168.0.2 and then accept it.
I recalculate the checksum and it's correct (i can see that by printing out 
it).

The basic problem is that, sniffing packets with wireshark, i can see the 
packet from 192.168.0.2 to outside, but not mine to outside.

I also tried with NF_REPEAT and NF_ACCEPT and NF_QUEUE when calling 
ipq_set_verdict, but nothing changed..

Any hints? RTFM?

Regards
-- 
Debian Powered GNU/Linux User #373118
Bedogni Luca - 	Blog | http://blog.lucabedogni.it
		        Site | http://www.lucabedogni.it
Debianizzati - www.debianizzati.org | Founder Member
--
Book: A non-volatile information storage medium. 


^ permalink raw reply	[flat|nested] 5+ messages in thread
* Routing packets via a C program
@ 2007-01-22  9:05 bedogniluca-linux
  0 siblings, 0 replies; 5+ messages in thread
From: bedogniluca-linux @ 2007-01-22  9:05 UTC (permalink / raw)
  To: netfilter

Hi all
        i'm writing down a simple program for routing
the packets manually.
The idea is:
if a packet comes from a specific IP (192.168.0.2) I
set ip->saddr to my ip 
and then accept it. And, if a packets comes from the
outside, i set ip->daddr 
to 192.168.0.2 and then accept it.
I recalculate the checksum and it's correct (i can see
that by printing it out).

The basic problem is that, sniffing packets with
wireshark, i can see the 
packet from 192.168.0.2 to outside, but not mine to
outside.

I also tried with NF_REPEAT and NF_ACCEPT and NF_QUEUE
when calling 
ipq_set_verdict, but nothing changed..

Any hints? RTFM?

Regards




	

	
		
___________________________________ 
Vinci i biglietti per FIFA World Cup in Germania! 
yahoo.it/concorso_messenger


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-02-01 17:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-22  8:58 Routing packets via a C program Luca Bedogni
2007-01-27 14:55 ` Jan Engelhardt
2007-01-30 16:14   ` Luca Bedogni
2007-02-01 17:12     ` Luca Bedogni
  -- strict thread matches above, loose matches on Subject: below --
2007-01-22  9:05 bedogniluca-linux

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.