All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [BUG?] unwanted proxy arp in 2.4.19-pre10
@ 2002-07-16 22:32 Julian Anastasov
  2002-07-16 20:04 ` Daniel Gryniewicz
  0 siblings, 1 reply; 20+ messages in thread
From: Julian Anastasov @ 2002-07-16 22:32 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: linux-kernel


	Hello,

Bill Davidsen wrote:

> Um, many people who are being probed from the Internet would like very
> much to NOT have it there, certainly by default. And would like to send an
> arp request and in return get a valid mac address.

	It seems you don't like the way ARP is replied in Linux. But
note that ARP follows IP, i.e. Linux replies on each device where it
is willing to accept IP for the same path. Such behaviour is caused by
the way IP is set by default in RFC1812: Source Address Validation
is disabled (rp_filter=0).

> I totally miss why anyone would consider this behaviouracceptable, much
> less desirable. Perhaps you or someone could explain why either accepting
> source routing or sending out invalid arp responses are desirable at all,
> much less as default behaviour. One is a security hole, the other brings
> the network group to the door with arpwatch output.

	What security, you are running without rp_filter set. Set it
and your Linux box will reply only through one interface without
using arp_filter.

> After some hours of reading the google results I see lots of questions, a
> few dubious workarounds, and zero people claiming that it's a good thing
> to work that way.

	Why? Do += 1 for me. What is wrong? In the URL I posted
you can find many solutions that additionally allow tuning of the
ARP behaviour because such fine grained control is used for
different setups. What was last discussed about the ARP and
rp_filter can stick in the following list of recommendations:

- use arp_filter=0 and rp_filter=0 where you don't care what
devices are used for the ARP/IP traffic. The DEFAULT behaviour!

- use arp_filter=1 and rp_filter=0 where you prefer each subnet
to use one interface but the IP traffic still can use many
devices (very useful for cross-subnet talks)

- use arp_filter=1 and rp_filter=1 where you want to restrict
both ARP and IP to same interface. This can break cross-subnet
talks if used. Here rp_filter=1 overrides the arp_filter
value.

- use arp_filter=1, rp_filter=1 and tune the rp_filter to
know about where each device is attached (you can see my
unofficial patch named "rp_filter_mask"). Such setting gives
you the ability to attach multiple interfaces to one hub and
to treat these interfaces as attached to "same security zone".
It is extension to rp_filter, we are not restricted to allow
traffic from one device. By this way you can use safely
rp_filter=1 for all devices attached to this hub and still to
allow cross-subnet talks when using these devices. This is the
difference from the previous example, i.e. arp_filter RECOMMENDS
each subnet to use one device but still to allow secure talks
for IP between hosts from different subnets.

Hope that answers much of your questions regarding Linux ARP.
If you still want to learn more about Linux ARP please switch
to linux-net or linux-netdev mlist.

Regards

--
Julian Anastasov <ja@ssi.bg>


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: [BUG?] unwanted proxy arp in 2.4.19-pre10
@ 2002-07-14 22:35 Julian Anastasov
  2002-07-15  5:40 ` David S. Miller
  0 siblings, 1 reply; 20+ messages in thread
From: Julian Anastasov @ 2002-07-14 22:35 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel, David S. Miller


	Hello All, David,

Andi Kleen wrote:

> The main use of this seem to be certain HA failover setups.
> Some people use a patch that allows to disable ARP per interface for it
> ("hidden") but for some reasons it was not integrated.

	Yes, "hidden" has its own purpose which is limitted
usually to HA setups. Then Alexey proposed (from long time)
such ARP tricks to be controlled with hook(s)/rules. My ideas in
such direction resulted in "iparp" which is completed:

http://www.linuxvirtualserver.org/~julian/#iparp

	Its purpose is "tuning" of ARP (the kernel's use
only), not for security. For example, it can't deal with remote
replies.

	But at the same time I see David implements arptables.
May be now it is good time to ask:

	David,

	can you explain what kind of control will be
possible with arptables. For now, I see only filtering of
remote probes. As we know the clusters have different needs.
Can you draw a list of goals that will be achieved with
arptables and whether the 2 ARP requirements for clusters ("drop
probes to VIP" and the most needed "don't announce VIP in our
probes") will exist in arptables? The 3th requirement (used
from "hidden" to avoid problems with autoselecting VIP as src
IP can be easily solved in routing).

> It would be likely easier/more straightforward if there was a special
> ARP routing table that is only consulted by ARP filter (as an extension
> to the current multi table routing). Then you could just put reject routes
> there to filter ARP Unfortunately nobody has stepped forward to implement it
> yet, so it remained a dream so far.
>
> Another thing that was implemented is a netfilter chain for ARP, but
> afaik there are no filtering modules for it yet, so Joe User cannot
> use it. It likely just exists somewhere as a proprietary module in
> someone's firewall appliance and all they did was to contribute the
> hook. It probably would not be hard to rewrite a filter module for it,
> but again nobody did it yet.

Regards

--
Julian Anastasov <ja@ssi.bg>


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: [BUG?] unwanted proxy arp in 2.4.19-pre10
@ 2002-07-14 10:34 Julian Anastasov
  2002-07-23 22:06 ` Bill Davidsen
  0 siblings, 1 reply; 20+ messages in thread
From: Julian Anastasov @ 2002-07-14 10:34 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: linux-kernel


	Hello,

Bill Davidsen wrote:

> 1, setting default, and setting 'all." The current settings, just the NICs
> in question, are producing two arp-replies with settings:

	As Alan already said, you need only arp_filter and I see
that you have the right settings in Node_B.

> eth0/arp_filter
> 1
> eth1/arp_filter
> 1

	Start with fixing your picture (all hubs and wires, please).
Linux ARP never sends 1 broadcasts through 2 devices, so it seems there is 
a hub near Node_A (or Node_A is running bridging), I can't believe 230.1 
and 230.4 are directly connected with cross cable. Make sure you have
the needed host/subnet routes for each interface. Also, make
sure tcpdump really shows the ARP replies, make the tests with
arp -d IP ; ping -c 1 IP

Regards

--
Julian Anastasov <ja@ssi.bg>


^ permalink raw reply	[flat|nested] 20+ messages in thread
* [BUG?] unwanted proxy arp in 2.4.19-pre10
@ 2002-07-13 16:21 Bill Davidsen
  2002-07-13 18:28 ` Alan Cox
  0 siblings, 1 reply; 20+ messages in thread
From: Bill Davidsen @ 2002-07-13 16:21 UTC (permalink / raw)
  To: Linux-Kernel Mailing List

I think there's a bug, or at least unexpected behaviour in 2.4.19-pre10
regarding ARP replies. I am getting multiple arp-replies to a who-has
request, and there seems to be no check in arp.c to verify that the
interface used for an arp reply actually has that address or has proxy
set.

Details:


     node_A 192.168.230.1              router
                |       \               192.168.231.127
		|	 \		192.168.0.0/16 access
                |      bridge            /
                |           \           /
                |            \         /
          192.168.230.4      192.168.231.4
                       \      /
                        node_B


When node_A does an arp request, who-has 192.168.230.4, it gets a
correct answer from the NIC with that IP. It also gets a reply from the
NIC on the 192.168.231 IP, because the ARP broadcast was bridged to that
NIC and there's no check to see if that NIC actually has the IP in
question. Since the networks are bridged for the moment, the 2nd reply
also arrives, later, and winds up in the arp table on node_A, where it
results in all traffic going through the bridge to the wrong NIC.

In the absense of the proxy_arp flag, I would not expect that reply,
the IP is not on that NIC. Before I "fix" that, is this intended
behaviour for some reason? Will I break something if I add check logic?
Is there something in /proc/sys/net/ipv4 I missed which will avoid this
response?

-- 
bill davidsen <davidsen@tmr.com>
  CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2002-07-23 22:10 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20020713.205930.101495830.davem@redhat.com.suse.lists.linux.kernel>
     [not found] ` <Pine.LNX.4.44.0207141026440.4252-100000@twinlark.arctic.org.suse.lists.linux.kernel>
2002-07-14 18:40   ` [BUG?] unwanted proxy arp in 2.4.19-pre10 Andi Kleen
2002-07-15  5:37     ` David S. Miller
2002-07-16 22:32 Julian Anastasov
2002-07-16 20:04 ` Daniel Gryniewicz
2002-07-16 23:41   ` Julian Anastasov
  -- strict thread matches above, loose matches on Subject: below --
2002-07-14 22:35 Julian Anastasov
2002-07-15  5:40 ` David S. Miller
2002-07-14 10:34 Julian Anastasov
2002-07-23 22:06 ` Bill Davidsen
2002-07-13 16:21 Bill Davidsen
2002-07-13 18:28 ` Alan Cox
2002-07-13 19:19   ` Gerhard Mack
2002-07-14  1:52     ` Alan Cox
2002-07-14  3:17   ` Bill Davidsen
2002-07-14  3:59     ` David S. Miller
2002-07-14 17:29       ` dean gaudet
2002-07-15  1:39         ` Bill Davidsen
2002-07-15  5:45           ` David S. Miller
2002-07-15 10:39             ` Bill Davidsen
2002-07-15  1:46       ` Bill Davidsen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.