From: Date: Wed, 01 Dec 2004 02:22:43 +0000 Subject: [LARTC] Iptables with 3 marks. It is possible? Message-Id: <20041201022243.32736.qmail@hm101.locaweb.com.br> MIME-Version: 1 Content-Type: multipart/mixed; boundary="----=OMAIL_ATT_0.0533259281228347" List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. ------=OMAIL_ATT_0.0533259281228347 Content-Type: text/plain; charset=ISO-8859-1 Hi.... Help me please!!! I am using Linux Redhat as gateway of the my network to internet. I am to making NAT and firewall. In my iptables script, I need make 3 MARKs for the same packet, as following # It marks the packets that will go for link ADSL (I have 2 links - adsl 2Mb and 'dedicate link' 256Mb ) # I am using 'ip rule / ip route' to make this iptables -t mangle -A PREROUTING -p tcp --dport 21 -j MARK --set-mark 2000 iptables -t mangle -A PREROUTING -p tcp --dport 20 -j MARK --set-mark 2000 # It marks the packets that will be shapped ( upload with cbq ) iptables -t mangle -A PREROUTING -m mac 00:11:22:33:44:55 -j MARK --set-mark 501 .... iptables -t mangle -A PREROUTING -m mac aa:bb:cc:dd:ee:ff -j MARK --set-mark 631 ###. I have 130 hosts in my network # It marks the packages that priority has ( with 'tc prio' command) iptables -t mangle -A PREROUTING -p tcp --dport 22 -j MARK --set-mark 100 iptables -t mangle -A PREROUTING -p tcp --dport 23 -j MARK --set-mark 100 iptables -t mangle -A PREROUTING -p udp --dport 27000:27015 -j MARK --set-mark 110 But only last mark does function Have solution ?? How to do? #Marcio P. Silva #linuXuser ------=OMAIL_ATT_0.0533259281228347 Hi.... Help me please!!! I am using Linux Redhat as router of the my network. I am to making NAT and firewall. In my iptables script, I need make 3 MARKs for the same packet, as following # It marks the packets that will go for link ADSL (I have 2 links - adsl 2Mb and 'dedicate link' 256Mb ) # I am using 'ip rule / ip route' to make this iptables -t mangle -A PREROUTING -p tcp --dport 21 -j MARK --set-mark 2000 iptables -t mangle -A PREROUTING -p tcp --dport 20 -j MARK --set-mark 2000 # It marks the packets that will be shapped ( upload with cbq ) iptables -t mangle -A PREROUTING -m mac 00:11:22:33:44:55 -j MARK --set-mark 501 .... iptables -t mangle -A PREROUTING -m mac aa:bb:cc:dd:ee:ff -j MARK --set-mark 631 ###. I have 130 hosts in my network # It marks the packages that priority has ( with 'tc prio' command) iptables -t mangle -A PREROUTING -p tcp --dport 22 -j MARK --set-mark 100 iptables -t mangle -A PREROUTING -p tcp --dport 23 -j MARK --set-mark 100 iptables -t mangle -A PREROUTING -p udp --dport 27000:27015 -j MARK --set-mark 110 But only last mark does function Have solution ?? How to do? #Marcio P. Silva #linuXuser ------=OMAIL_ATT_0.0533259281228347-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/