All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hugh Buchanan <isp-lists@userfriendly.com>
To: netfilter@lists.netfilter.org
Subject: iptables not correctly marking packets based on source address
Date: Sun, 25 May 2003 14:48:02 -0700	[thread overview]
Message-ID: <3ED13A12.9000601@userfriendly.com> (raw)

Greetings,

I am using iptables, currently as a NAT firewall but it will become a 
bridge firewall when I have it working correctly.

I have two simple rules for marking right now:

iptables -A PREROUTING -i eth1 -s $LAN -t mangle -j MARK --set-mark 1
iptables -A PREROUTING -i eth1 -t mangle -j MARK --set-mark 2

$LAN is defined to be "192.168.0.0/24"

Now.. I found a bit in the list archives about mangling with NAT.. so I 
am wondering if the source address is wrong.  But shouldn't PREROUTING 
happen before the NAT takes place?


My end goal is to have a mangle line for each of the half a dozen source 
addresses.  For example:
192.168.0.5 - mark as '2'
192.168.0.6 - mark as '3'
192.168.0.7 - mark as '4'
192.168.0.8 - mark as '5'
192.168.0.9 - mark as '6'
192.168.0.10 - mark as '7'
And all other source addresses should be marked as '1'.

I was thinking that I could do something like:
iptables -A PREROUTING -s 192.168.0.5 -t mangle -j MARK --set-mark 2

But that isn't working for me.

Hugh Buchanan






                 reply	other threads:[~2003-05-25 21:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3ED13A12.9000601@userfriendly.com \
    --to=isp-lists@userfriendly.com \
    --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 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.