From: "kaiwen" Subject: Match packet mark with --set-mark to ip rule fwmark Date: Wed, 7 Jan 2004 12:10:05 +0800 Sender: netfilter-admin@lists.netfilter.org Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01E6_01C3D517.2FBEBFA0" Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: netfilter@lists.netfilter.org This is a multi-part message in MIME format. ------=_NextPart_000_01E6_01C3D517.2FBEBFA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, Here I am trying something simple. My objective is to make ip rule fwmark command work :) Network Diagram: --- 192.168.250.197 (eth0) Linux Box (eth1) 192.168.8.88 = -------------192.168.8.122 (eth0) Windows XP Client Configuration done on Linux Box:- (1) [root@g webauth]# iptables -t mangle -A PREROUTING -j MARK = --set-mark 5 [root@g webauth]# iptables -t mangle -L Chain PREROUTING (policy ACCEPT) target prot opt source destination MARK all -- anywhere anywhere MARK set 0x5 (2) [root@g webauth]# ip rule add fwmark 5 table test2 [root@g webauth]# ip rule 0: from all lookup local 32765: from all fwmark 5 lookup test2 32766: from all lookup main 32767: from all lookup 253 (3) [root@g webauth]# ip ro show table test2 prohibit 192.168.8.122 I expect ping from 192.168.8.122 to 192.168.250.197 to be drop, BUT is = is successful. Why? Did I miss out anything? Please advice. Thank you Kaiwen ------=_NextPart_000_01E6_01C3D517.2FBEBFA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
Hi,

Here=20 I am trying something simple.
My objective is to make ip rule fwmark = command=20 work :)

Network Diagram:
--- 192.168.250.197 (eth0) Linux Box = (eth1)=20 192.168.8.88 -------------192.168.8.122 (eth0) Windows XP=20 Client

Configuration done on Linux Box:-

(1) [root@g = webauth]#=20 iptables -t mangle -A PREROUTING -j MARK --set-mark 5
[root@g = webauth]#=20 iptables -t mangle -L
Chain PREROUTING (policy=20 ACCEPT)
target     prot opt=20 source           &= nbsp;  =20 destination
MARK       all  = -- =20 anywhere           = ; =20 anywhere           = MARK set=20 0x5

(2) [root@g webauth]# ip rule add fwmark 5 table=20 test2

[root@g webauth]# ip = rule
0:      from=20 all lookup local
32765:  from all=20 fwmark        5 lookup = test2
32766: =20 from all lookup main
32767:  from all lookup 253

(3) = [root@g=20 webauth]# ip ro show table test2
prohibit 192.168.8.122

I = expect ping=20 from 192.168.8.122 to 192.168.250.197 to be drop, BUT is = is
successful.=20 Why?
Did I miss out anything? Please advice.

Thank=20 you
Kaiwen

------=_NextPart_000_01E6_01C3D517.2FBEBFA0--