From mboxrd@z Thu Jan 1 00:00:00 1970 From: "bharat merja" Date: Wed, 03 Oct 2001 14:18:12 +0000 Subject: [LARTC] Policy based routing form SRC Mac address. MIME-Version: 1 Content-Type: multipart/mixed; boundary="----=_NextPart_000_007D_01C14C42.A8993550" Message-Id: List-Id: References: In-Reply-To: To: lartc@vger.kernel.org This is a multi-part message in MIME format. ------=_NextPart_000_007D_01C14C42.A8993550 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, Thanks to all in advance, In recent I need policy based routing on my Linux2.4.3 box. requirement = is like to give access of Internet to some computers while this facility = is not available to rest people (That is based on MAC address only). My existin routing in "table main" is... 192.168.1.0/26 dev eth0 proto kernel scope link src 192.168.1.3=20 192.168.1.64/26 dev eth1 proto kernel scope link src 192.168.1.65=20 192.168.2.0/24 via 192.168.1.2 dev eth0=20 127.0.0.0/8 dev lo scope link=20 default via 192.168.1.1 dev eth0=20 Where 192.168.1.1 is ip of router, there is no restriction required on = 192.168.1.0/26, while on 192.168.1.64/26 I need to give access to some = computers only. I have done some work on it but not get success. I have done like #iptables -A PREROUTING -t mangle -i eth1 -m mac --mac-source = ab:cd:ef:12:34:56 -j MARK --set-mark 1 #ip rule add fwmark 1 table John #ip route add unreachable default table John Then after I have tried in INPUT too.. But no success. If any one have implemented in their network Please guide me. What basic = mistakes I am commiting in this scenario? Looking forward for kind reply from Network Gurus. Thanks and regards Bharat Merja. ------=_NextPart_000_007D_01C14C42.A8993550 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
Hi,
 
Thanks to all in advance,
 
In recent I need policy based = routing on my=20 Linux2.4.3 box. requirement is like to give access of Internet = to some=20 computers while this facility is not available to rest people (That is = based on=20 MAC address only).
 
My existin routing in "table=20 main" is...
 
192.168.1.0/26 dev eth0  proto = kernel =20 scope link  src 192.168.1.3
192.168.1.64/26 dev eth1  = proto=20 kernel  scope link  src 192.168.1.65
192.168.2.0/24 via=20 192.168.1.2 dev eth0
127.0.0.0/8 dev lo  scope link
default = via=20 192.168.1.1 dev eth0
 
Where 192.168.1.1 is ip of router, = there is no=20 restriction required on 192.168.1.0/26, while on 192.168.1.64/26 I need = to give=20 access to some computers only.
 
I have done some work on it but not get = success. I=20 have done like
 
#iptables -A PREROUTING -t mangle -i = eth1 -m mac=20 --mac-source ab:cd:ef:12:34:56 -j MARK --set-mark 1
#ip rule add fwmark 1 table=20 John
#ip route add unreachable default = table=20 John
 
Then after I have tried in INPUT = too.. But no=20 success.
 
If any one have implemented in = their network=20 Please guide me. What basic mistakes I am commiting in this=20 scenario?
 
Looking forward for kind reply = from Network=20 Gurus.
 
Thanks and = regards
Bharat=20 Merja.
------=_NextPart_000_007D_01C14C42.A8993550-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/