* iptables not correctly marking packets based on source address
@ 2003-05-25 21:48 Hugh Buchanan
0 siblings, 0 replies; only message in thread
From: Hugh Buchanan @ 2003-05-25 21:48 UTC (permalink / raw)
To: netfilter
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-05-25 21:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-25 21:48 iptables not correctly marking packets based on source address Hugh Buchanan
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.