[PLUG] ARP black magic question
Galen Seitz
galens at seitzassoc.com
Tue Aug 26 14:22:02 UTC 2003
Zot O'Connor <zot at whiteknighthackers.com> wrote:
> The question is, do you want to proxy an IP or a mac address?
>
> Lets assume outside and inside of a gateway.
>
> Address 192.168.90.45 is inside
>
> 192.168.90.46 is the gateway's nic on the inside (eth1)
> 192.168.90.47 is the gateway's nic on the outside. (eth0)
> 192.168.90.1 is the real default gateway which is on the outside.
>
> So we want to make 192.168.90.45 look like it available to the outside
>
> we have eth1 for the inside, and eth0 for the outside
>
> To publish to outside that .45 is to be "answered" by eth0
> arp -Ds 192.168.90.45 eth1 pub -i eth0
>
> To publish to the inside that .1 is to answered by eth1
> arp -Ds 192.168.90.1 eth0 pub -i eth1
>
> You should be able to do this with MAC Address as well.
>
> Word of warning, this works real well under Linux, but other Unix-like
> OSes including routers do not always support pub.
Zot, I think that may be the hard way to do it. Here's someone else's
example of how to use proxy arp. Let me know if I got it wrong.
galen
List: linux-net
Subject: Re: ARP reply on behalf of another interface?
From: Walter Zimmer <walter.zimmer () esk ! fhg ! de>
Date: 2002-08-13 8:11:55
[Download message RAW]
Hi!
Chae-yong Chong wrote:
> In brief, what condition does linux kernel send ARP reply?
I can only answer to his question, because I could not figure
out how the assemble the ascii art into a network.
However, perhaps it helps anyway:
If you enable proxy ARP on a linux 2.4 interface by writing '1'
into /proc/sys/net/ipv4/conf/<interface>/proxy_arp,
all ARP requests received on this interface for an IP address
which is routed via another interface are answered with the
own hardware address.
So if you have interface eth0 with 192.168.1.1/24 with the
interface route (ip route show table local) going
to 192.168.1.0/24 and another route, let's say for
192.168.1.50 going via eth1, this and only this address
is proxy arp'ed on interface eth0.
This also makes perfect sense, since routing tells the kernel
where a host is assumed to be located, and answering an ARP
request for a host which is believed to be located in the
same network doesn't make sense.
Hope this helps,
Walter
More information about the PLUG
mailing list