Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Joel Vosu <joel.vosu@mail.ee>
To: netfilter@lists.netfilter.org
Subject: Re: Change source address on incoming packets
Date: Mon, 10 May 2004 01:31:56 +0300	[thread overview]
Message-ID: <409EB15C.3080707@mail.ee> (raw)
In-Reply-To: <200405092314.01941.Antony@Soft-Solutions.co.uk>

Antony Stone wrote:

>On Sunday 09 May 2004 10:50 pm, Joel Vosu wrote:
>
>  
>
>>I would need to be able to change the source address of incouming
>>packets. I have 2 different subnets, but I need the server to see the
>>packes from the 2nd subnet as coming from the 1st.
>>in iptables it would be something like:
>>iptables -A PREROUTING -t nat -s 2nd_subnet -j SNAT --to-source
>>local_machine
>>but this is not possible because SNAT only works for outgoing packets in
>>POSTROUTING.
>>Is there a way to get this to work other than adding a second router box
>>for NAT?
>>    
>>
>
>The only way I can think you'd be able to do this on one box is by hacking 
>around the source for netfilter so you can use SNAT in PREROUTING.   You'd 
>need to be careful about the auto-reverse NAT for reply packets, as well, to 
>make sure they go back to the original machine.
>
>Not impossible, by any means, but it's almost certainly easier to dig up an 
>old 486 or Pentium and run NAT on that.
>
>Regards,
>
>Antony.
>
>  
>
Thanks Antony,
But since I'm not that good at hacking source I hope I'll still find an 
easyer solution. As for the 486 or pentium part... if I cant find 
anything by tomorrow morning I'll have to use that. Right now I'm 
checking proxy applications if they can do what is required.

Joel


  reply	other threads:[~2004-05-09 22:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-09 21:50 Change source address on incoming packets Joel Vosu
2004-05-09 22:14 ` Antony Stone
2004-05-09 22:31   ` Joel Vosu [this message]
2004-05-10 10:56 ` John A. Sullivan III
2004-05-13 12:36   ` Joel Vosu

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=409EB15C.3080707@mail.ee \
    --to=joel.vosu@mail.ee \
    --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