All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pascal Hambourg <pascal@plouf.fr.eu.org>
To: Tobias Andresen <tobiasarp@gmx.de>
Cc: netfilter <netfilter@vger.kernel.org>
Subject: Re: NTP forwarding
Date: Mon, 07 Mar 2016 20:33:02 +0100	[thread overview]
Message-ID: <56DDD76E.3090705@plouf.fr.eu.org> (raw)
In-Reply-To: <56DD2CC8.1030902@gmx.de>

Tobias Andresen a écrit :
> Am 06.03.2016 um 22:40 schrieb Pascal Hambourg:
>>
>>> iptables -t nat -A POSTROUTING -p udp --dport 123 -j MASQUERADE
>>
>> Why is this rule needed ? What's between 10.0.0.95 and 62.214.6.29 ?
>
> This is the internet connection.

But I suppose it is not a simple wire. 10.0.0.95 is a private address
and 62.214.6.29 is a public IP address, so there must be some sort of
NAT router between them. Am I correct ?

> I cannot achieve this by using iptables or why would you prefer plain 
> routing?

Because the action of carrying packets from the source to the
destination is done by routing.

> I thought i have to use iptables because the ntp server (62.214.6.29) 
> does not know who is behind 10.0.0.95
> and the embedded device has to change the source and destination address...

Why ? IIUC 62.214.6.29 is a public address on the internet and 10.0.0.95
is a private address on your LAN, so the NTP server does not know about
10.0.0.95 either. The job of changing private addresses must be
performed by some other device connected to the same network as eth0.
Only that device needs to know about your private addresses.

  reply	other threads:[~2016-03-07 19:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-05 14:15 NTP forwarding Tobias Andresen
2016-03-06 20:42 ` Pascal Hambourg
2016-03-06 21:16   ` Tobias Andresen
2016-03-06 21:40     ` Pascal Hambourg
2016-03-07  7:24       ` Tobias Andresen
2016-03-07 19:33         ` Pascal Hambourg [this message]
2016-03-07  3:49     ` Remzi AKYÜZ
2016-03-07  7:26       ` Tobias Andresen
2016-03-07  9:24         ` Vigneswaran R
2016-03-07 10:05         ` Remzi AKYÜZ
2016-03-08 11:54 ` Karol Babioch

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=56DDD76E.3090705@plouf.fr.eu.org \
    --to=pascal@plouf.fr.eu.org \
    --cc=netfilter@vger.kernel.org \
    --cc=tobiasarp@gmx.de \
    /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.