Re: resolving Mac adress
From:Date: 06/17/02
- Next message: norm: "Re: Sniffier at Switching HUB"
- Previous message: D' Naab 136: "resolving Mac adress"
- In reply to: D' Naab 136: "resolving Mac adress"
- Next in thread: : "Re: resolving Mac adress"
- Reply: : "Re: resolving Mac adress"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 16 Jun 2002 21:27:26 -0700
"D' Naab 136" <me@somewhere.com> wrote in message news:<Xns922FBC4AE431Eqklgjfkgds455132dgfh@195.238.3.180>...
> Hi,
>
>
> Does anyone knows how to get the Mac adress of a remote host by giving the
> IP adress?
>
>
> thx.
On Linux you can look at the arp cache. This is only applicable to
local
hosts. There is no arp resolution. The MAC address is only used for
local
(read same device, hub, switch, router, etc) communications.
$ arp -n
Address HWtype HWaddress Flags Mask
Iface
10.78.109.2 ether 00:50:BA:5D:7B:AA C
eth0
10.78.109.3 ether 00:E0:29:43:7E:AA C
eth0
10.78.109.1 ether 00:E0:29:87:F1:AA C
eth0
If you do see anything remote it will have the Router's MAC and not
the
MAC of the machine you are actually talking to.
[root@www init.d]# arp
Address HWtype HWaddress Flags Mask
Iface
GW.SUNPERF.COM ether 00:20:6F:10:84:AA C
eth1
DUAL200.SUNPERF.COM ether 00:50:BA:5D:8A:AA C
eth0
GW is the border router.
If you are trying to determine where a packet is really coming from,
the MAC
is not the way. Spoofed packets can only be detected on the LAN they
originate
from. This can only be handled at the ISP level, in that they know the
valid
address range at each of their routers and set access lists to only
allow
packets destined to and from only those valid ranges. Of course this
has to happen as someone else's ISP, as well as yours.
You could possibly look for source route options in the TCP header. I
am not
sure whether any of the popular IDS's decode the options. Most of them
will
provide a full packet dump though and you can decode them yourself.
RFC791 should have the specification. You can set options in the Linux
kernel to drop source routed packets see the /proc file sytem
documentation
that comes with the kernel you are running. For Solaris you can set
networking
options with ndd. An ndd get \? (if my memory serves me, or you could
just
read the man page) will list all the available parameters.
Norm.
---------------------------------------------------------
For God makes the sun rise on bad and good alike; Gods
rain falls on the just and the unjust. (Matthew 5:44-45)
http://www.sunperf.com - Performance Monitoring Tools
http://www.justhacked.org - UNIX Security
- Next message: norm: "Re: Sniffier at Switching HUB"
- Previous message: D' Naab 136: "resolving Mac adress"
- In reply to: D' Naab 136: "resolving Mac adress"
- Next in thread: : "Re: resolving Mac adress"
- Reply: : "Re: resolving Mac adress"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|