Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Luca Bedogni <bedogniluca-linux@yahoo.it>
To: netfilter@lists.netfilter.org
Subject: Routing packets via a C program
Date: Mon, 22 Jan 2007 09:58:51 +0100	[thread overview]
Message-ID: <200701220958.51794.bedogniluca-linux@yahoo.it> (raw)

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. 


             reply	other threads:[~2007-01-22  8:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-22  8:58 Luca Bedogni [this message]
2007-01-27 14:55 ` Routing packets via a C program 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200701220958.51794.bedogniluca-linux@yahoo.it \
    --to=bedogniluca-linux@yahoo.it \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox