Linux Routers working
Hello,
Is there any way on linux routers to know on
which interface packet is forwarded before actually packet trasmission begins? Also before packet processed by IP layer can it be possible to know from which adjecent Router'IP packet came to that router? regards,
cranium
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoting cranium2003 on 2005-05-13 04:15 UTC:
Quoted 3 lines
Is there any way on linux routers to know on
which interface packet is forwarded before actually packet trasmission begins?
In the FORWARD table you know both the incoming and outgoing interface:
This will match packets coming in from eth0 and going out on eth1:
iptables -A FORWARD -i eth0 -o eth1 ...
Quoted 3 lines
Also before packet
processed by IP layer can it be possible to know from which adjecent Router'IP packet came to that router?
No, but the MAC address is available. You just have to find out what the mac address of the router in question and do:
iptables -A INPUT -m mac --mac-source 01:23:45:67:89:AB ...
- --
- - xkr47
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFChDoExyF48ZTvn+4RAsN5AJwPHokkgN2tnHTiA0skEJqT3x72BACgnPdp Szvrqa0td9onDdsoNDw19Zw=
=gp/k
-----END PGP SIGNATURE-----