All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Claudio L. Salvadori" <cls@xpnet.com.br>
To: lartc@vger.kernel.org
Subject: [LARTC] How to MARK NATtted packets coming from external interface to an internal host ?
Date: Thu, 13 Dec 2001 12:27:37 +0000	[thread overview]
Message-ID: <marc-lartc-100824638812421@msgid-missing> (raw)

Hi,

I would like to control download bandwidth from the Internet for
clients inside a network. The gateway is a Linux box using
'iptables nat'.
I would like to use 'iptables mangle' to mark the packets coming
from the Internet and going to specific clients and then use CBQ
to shape it:


                         +-----------+
Internal network        |   Linux   |        Internet
------0-----------------|  Gateway  |-------------
       |            eth0 |    NAT    | eth1
    [client]             +-----------+
   192.168.1.8


I tried to use the following command to mark the packets:

iptables -t mangle -A PREROUTING -i eth1 -d 192.168.1.8
           -j MARK --set-mark 1

But the packets are not being marked probably because they were
not NATtted yet and still have the destination ip of the external interface.

How can I classify this traffic so I can shape it ?


Best regards,
Claudio Leonel Salvadori
cls@xpnet.com.br







_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

             reply	other threads:[~2001-12-13 12:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-13 12:27 Claudio L. Salvadori [this message]
2001-12-13 13:39 ` [LARTC] How to MARK NATtted packets coming from external interface to an internal host ? bert hubert
2001-12-13 16:42 ` Claudio L. Salvadori
2001-12-16 13:52 ` bert hubert

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=marc-lartc-100824638812421@msgid-missing \
    --to=cls@xpnet.com.br \
    --cc=lartc@vger.kernel.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 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.