From: "Salim" Date: Thu, 24 Nov 2005 05:55:00 +0000 Subject: [LARTC] ftp connmark Message-Id: <002701c5f0bc$557424c0$455f030a@askeyrd3> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============0050448368==" List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. --===============0050448368== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0024_01C5F0FF.6096CEF0" This is a multi-part message in MIME format. ------=_NextPart_000_0024_01C5F0FF.6096CEF0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" I saw this snippet from=20 Daniel Chemko dchemko@smgtec.com=20 Mon, 31 May 2004 09:30:43 -0700=20 # Egress marking (mostly for QOS operations) iptables -t mangle -A POSTROUTING -j CONNMARK --restore-mark iptables -t mangle -A POSTROUTING -m mark ! --mark 0 -j ACCEPT iptables -t mangle -A POSTROUTING -o ${if_inet} --dport 21 -j MARK --set-mark 0x111 iptables -t mangle -A POSTROUTING -j CONNMARK --save-mark I want to mark many packets, including FTP. So above these lines, I have a few more lines in my script. Like the = following... iptables -t mangle -A POSTROUTING -p icmp -j MARK --set-mark 0x110 iptables -t mangle -A POSTROUTING -j CONNMARK --restore-mark iptables -t mangle -A POSTROUTING -m mark ! --mark 0 -j ACCEPT iptables -t mangle -A POSTROUTING -o ${if_inet} --dport 21 -j MARK --set-mark 0x111 iptables -t mangle -A POSTROUTING -j CONNMARK --save-mark So, when an ICMP packet comes to the 2nd ('restore-mark') line, it is = already marked with 0x110. Will the restore-mark mark the packet with 0 = since there is no connmark set for ICMP? Or it will leave the packet = untouched? In that case, I can not redirect the ICMP packet to the class I defined = for it.=20 What is the solution for this issue? What to do if I have different = classification marks, some use connmark and some does not(just fw mark)? regards Salim ------=_NextPart_000_0024_01C5F0FF.6096CEF0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="iso-8859-1"
I saw this snippet from
Daniel Chemko dchemko@smgtec.com
Mon, = 31 May=20 2004 09:30:43 -0700
 
 
# Egress marking (mostly for QOS operations)
iptables -t mangle = -A=20 POSTROUTING -j CONNMARK --restore-mark
iptables -t mangle -A = POSTROUTING -m=20 mark ! --mark 0 -j ACCEPT
iptables -t mangle -A POSTROUTING -o = ${if_inet}=20 --dport 21 -j MARK
--set-mark 0x111
iptables -t mangle -A = POSTROUTING -j=20 CONNMARK --save-mark
 
 
I want to mark many packets, including=20 FTP.
 
So above these lines, I have a few more = lines in my=20 script. Like the following...
 
iptables -t mangle -A POSTROUTING  -p icmp -j = MARK=20 --set-mark 0x110
 
iptables -t mangle -A POSTROUTING -j CONNMARK = --restore-mark
iptables -t=20 mangle -A POSTROUTING -m mark ! --mark 0 -j ACCEPT
iptables -t mangle = -A=20 POSTROUTING -o ${if_inet} --dport 21 -j MARK
--set-mark = 0x111
iptables -t=20 mangle -A POSTROUTING -j CONNMARK --save-mark
 
So, when an ICMP packet comes to the = 2nd=20 ('restore-mark') line, it is already marked with 0x110. Will the = restore-mark=20 mark the packet with 0 since there is no connmark set for ICMP? Or it = will leave=20 the packet untouched?
In that case, I can not redirect the = ICMP packet to=20 the class I defined for it.
What is the solution for this issue? = What to do if=20 I have different classification marks, some use connmark and some does = not(just=20 fw mark)?
 
regards
Salim

------=_NextPart_000_0024_01C5F0FF.6096CEF0-- --===============0050448368== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============0050448368==--