<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://kb.linuxvirtualserver.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=R1ck</id>
		<title>LVSKB - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://kb.linuxvirtualserver.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=R1ck"/>
		<link rel="alternate" type="text/html" href="http://kb.linuxvirtualserver.org/wiki/Special:Contributions/R1ck"/>
		<updated>2026-05-16T23:18:52Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://kb.linuxvirtualserver.org/wiki?title=Using_arptables_to_disable_ARP&amp;diff=4312</id>
		<title>Using arptables to disable ARP</title>
		<link rel="alternate" type="text/html" href="http://kb.linuxvirtualserver.org/wiki?title=Using_arptables_to_disable_ARP&amp;diff=4312"/>
				<updated>2007-07-11T15:10:15Z</updated>
		
		<summary type="html">&lt;p&gt;R1ck: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== arptables ==&lt;br /&gt;
&lt;br /&gt;
Arptables is used to set up, maintain, and inspect the tables of [[ARP]]&lt;br /&gt;
packet filter rules in the Linux kernel. Several different tables may&lt;br /&gt;
be defined. Each table contains a number of built-in chains and may&lt;br /&gt;
also contain user-defined chains.&lt;br /&gt;
&lt;br /&gt;
Each chain is a list of rules which can match a set of  packets. Each&lt;br /&gt;
rule specifies what to do with a packet that matches. This is called a&lt;br /&gt;
'target', which may be a jump to a user-defined chain in the same table.&lt;br /&gt;
&lt;br /&gt;
See &amp;quot;man arptables&amp;quot; for more information.&lt;br /&gt;
&lt;br /&gt;
The ARP filter is available at both the Linux kernel 2.4 and 2.6.&lt;br /&gt;
&lt;br /&gt;
== Disable ARP for VIP ==&lt;br /&gt;
&lt;br /&gt;
Basically, we have the following commands to disable [[ARP]] for [[VIP]] at real servers.&lt;br /&gt;
 arptables -F&lt;br /&gt;
 arptables -A IN -d $VIP -j DROP&lt;br /&gt;
 arptables -A OUT -s $VIP -j mangle --mangle-ip-s $RIP&lt;br /&gt;
Where '''$VIP''' is the virtual IP address and '''$RIP''' is the IP address of the interface connected to VIP network at real server.&lt;br /&gt;
&lt;br /&gt;
* The first command is to flush the arp packet filtering table.&lt;br /&gt;
* The second command is to drop the incoming ARP request for VIP at real server.&lt;br /&gt;
* The third command is to mangle the source ip of outgoing ARP request from $VIP to $RIP, because when the real server sends response packet with source $VIP to client, it may send ARP request with source $VIP for the router or a host in the VIP network, we have to mangle its source ip from $VIP to $RIP, otherwise the ARP request would not succeed and no response could be sent to client.&lt;br /&gt;
&lt;br /&gt;
The other note is that the arptables rules must be setup before the $VIP address is brought up at logical interface, such as alias or dummy interface.&lt;br /&gt;
&lt;br /&gt;
== Linux Distributions ==&lt;br /&gt;
&lt;br /&gt;
=== RHEL 3/CentOS 3 ===&lt;br /&gt;
&lt;br /&gt;
If arptables is not available at installed OS system, run the following command to install the arptables package:&lt;br /&gt;
 yum install arptables_jf&lt;br /&gt;
It will install the version arptables_jf-0.0.7-0.3E.&lt;br /&gt;
&lt;br /&gt;
=== RHEL 4/CentOS 4 ===&lt;br /&gt;
&lt;br /&gt;
If arptables is not available at installed OS system, run the following command to install the arptables package:&lt;br /&gt;
 yum install arptables_jf&lt;br /&gt;
It will install the version arptables_jf-0.0.8-2.&lt;br /&gt;
&lt;br /&gt;
=== Debian Etch/4.0 ===&lt;br /&gt;
arptables can be found in the 'arptables' package. You can install it with:&lt;br /&gt;
 apt-get install arptables&lt;br /&gt;
&lt;br /&gt;
Currently this installs version v0.0.3.&lt;br /&gt;
&lt;br /&gt;
[[Category:ARP Issue]]&lt;/div&gt;</summary>
		<author><name>R1ck</name></author>	</entry>

	</feed>