From: Patrick McHardy <kaber@trash.net>
To: Vasantha Kumar Puttappa <vasanthakumar@iitb.ac.in>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: ip_local_deliver related query
Date: Fri, 03 Feb 2006 14:56:17 +0100 [thread overview]
Message-ID: <43E36101.8020708@trash.net> (raw)
In-Reply-To: <60828.10.107.26.27.1138947199.squirrel@gpo.iitb.ac.in>
Vasantha Kumar Puttappa wrote:
> Hi,
>
> ( I am assuming packet arrival to the local host)
>
> As far as I know Netfilter hook for "INPUT" chain is called just before
> the ip_local_deliver() function is called. If I am not wrong,
> ip_local_deliver function will remove the IP header and gives the packet
> to appropriate function in transport layer ( TCP or UDP or ICMP
> Process).
>
>
> What I am want to do is to change the source IP address of the IP packet
> just before calling the ip_local_deliver() using IPtables.
>
> So I want know, will this go smoothly assuming there is a socket waiting
> for this kind of packet(packet with new source IP address) or will
> something go wrong ?
This is exactly what NAT does. If you use DNAT in LOCAL_OUT, a SNAT
mapping is also set up for LOCAL_IN. The socket lookup is performed
later in the individual protocols, so it will use the rewritten
source address.
next prev parent reply other threads:[~2006-02-03 13:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-03 6:13 ip_local_deliver related query Vasantha Kumar Puttappa
2006-02-03 13:56 ` Patrick McHardy [this message]
2006-02-04 6:21 ` Vasantha Kumar Puttappa
2006-02-07 6:28 ` Vasantha Kumar Puttappa
2006-02-07 14:47 ` Patrick McHardy
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=43E36101.8020708@trash.net \
--to=kaber@trash.net \
--cc=netfilter-devel@lists.netfilter.org \
--cc=vasanthakumar@iitb.ac.in \
/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 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.