From: Francesco Ciocchetti <primero@fastwebnet.it>
To: netfilter@lists.netfilter.org
Subject: Re: DNS and NAT
Date: Fri, 15 Jul 2005 20:52:18 +0200 [thread overview]
Message-ID: <42D805E2.4050004@fastwebnet.it> (raw)
In-Reply-To: <BAY17-F18542F2DB3D75F41B0487580D00@phx.gbl>
Suzana Lojic-Skoric wrote:
>
>
>> From: Jörg Harmuth <harmuth@mnemon.de>
>> To: netfilter@lists.netfilter.org
>> Subject: Re: DNS and NAT
>> Date: Fri, 15 Jul 2005 10:53:17 +0200
>>
>> Suzana Lojic-Skoric schrieb:
>>
>> > I don't think proxy can help because it is just caching the web pages,
>> > it does not change the IP addresses. I'll check if tunneling can help,
>> > if not then I'll have to change iptables to inspect DNS answer and
>> > replace the IP in the payload.
>>
>> No. Introducing a proxy at the right location, is much more than just
>> caching web sites. It means significant changes to at least to the IP
>> headers.
>>
>> Wether a proxy helps you or not depends totally on where you place the
>> proxy. If you place it on the nat box (like primero said) or between
>> this nasty dropping box and the nat box, everything is probably fine.
>> The requests will then go to 10.x.x.x and the answers will originate
>> from 10.x.x.x. The e.g. google address of 216.239.39.99 is within the
>> *data* part of the 4th packet - not in the headers (headers are
>> src=10.y.y.y dst=10.x.x.x). As long as the nasty dropping box doesn't
>> scan the packets payload for proxy requests and the like and drops them,
>> everything should work.
>
>
> I can put the proxy on the NAT machine.
> As I said, right now just with the NAT, if I send a DNS request for
> the google.com from the client 10.0.0.1 behind the nasty dropping box,
> it will go out through the nasty dropping box and the NAT gateway. NAT
> will change its 10.x.x.x source and destination from 10.x.x.x to some
> outside addresses e.g. 150.x.x.x. The DNS answer comes back to NAT,
> it's source and destination gets translated back to 10.x.x.x and
> 10.0.0.1 destination, and the google address 216.239.39.99 is within
> the *data* part. This goes fine through the nasty dropping box back to
> the client 10.0.0.1. Client then takes the answer from the data part
> of the message, which is 216.239.39.99 and tries to contact it. It
> sends an HTTP message to destination 216.239.39.99. This gets dropped
> on the nasty dropping box since it is not 10.x.x.x (This is what's
> happening when you type in www.google.com in the browser on the client
> 10.0.0.1).
> So the DNS request and answer can get through the internal network,
> but what I need is to somehow replace the 216.239.39.99 that is
> embedded in the DNS *data* with 10.z.z.z. Also my NAT needs to know
> that 10.z.z.z is actually 216.239.39.99. to be able to translate it
> for outside.
>
> Do you still think proxy can help?
>
with a *standard proxy* configured on the browser of client 10.0.0.1
your request for 216.239.39.99 will be in the payload of the proxy
request that has the IP address of your proxy machine in the destination
address field of the network layer ... it should be good for your nasty
dropping box.
From there the HTTP request will be managed from your proxy wich will
answer to your client with a connection completely inside the 10.x.x.x
network.
bye
<f>
next prev parent reply other threads:[~2005-07-15 18:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-13 17:10 DNS and NAT Suzana Lojic-Skoric
2005-07-14 13:29 ` Jörg Harmuth
2005-07-14 15:50 ` Suzana Lojic-Skoric
2005-07-14 16:00 ` primero
2005-07-14 20:33 ` Suzana Lojic-Skoric
2005-07-15 8:53 ` Jörg Harmuth
2005-07-15 16:30 ` Suzana Lojic-Skoric
2005-07-15 16:45 ` R. DuFresne
2005-07-15 17:04 ` Suzana Lojic-Skoric
2005-07-15 18:52 ` Francesco Ciocchetti [this message]
2005-07-15 19:10 ` Suzana Lojic-Skoric
2005-07-15 19:51 ` Suzana Lojic-Skoric
-- strict thread matches above, loose matches on Subject: below --
2005-07-11 19:37 Suzana Lojic-Skoric
2005-07-11 19:41 ` Jason Opperisano
2005-07-11 20:33 ` Suzana Lojic-Skoric
2005-07-11 20:44 ` Jason Opperisano
2005-07-11 21:25 ` /dev/rob0
2005-07-11 21:36 ` Jan Engelhardt
2005-07-12 4:05 ` R. DuFresne
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=42D805E2.4050004@fastwebnet.it \
--to=primero@fastwebnet.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