LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Disable ARP response on one of IPs (https://www.linuxquestions.org/questions/linux-networking-3/disable-arp-response-on-one-of-ips-4175486153/)

Lieta 11-28-2013 08:36 AM

Disable ARP response on one of IPs
 
Hi.
I have assigned 2 IP addresses to one network interface. For example:
192.168.1.100 and
10.2.2.1
Is it possible to disable ARP response on a particular IP address? I.e. respond only to request of 192.168.1.100, but not respond on 10.2.2.1.

tva 11-28-2013 09:39 AM

I have no experience on this but with google I found this, I hope it helps.

psycroptic 11-29-2013 12:19 AM

well, i know if you disable ARP, then each system on the network needs to have every other system's MAC address and corresponding IP entered into its ARP tables manually. If you are prepared to do this (which, if you have a small network, is quite doable), you can run

Code:

arp -s xx:xx:xx:xx:xx:xx 1.2.3.4
where xx:xx:xx:xx:xx:xx is the remote machines MAC and 1.2.3.4 is its IP address. Remember that the system on the other end will need the same kind of config but pointing back to your 10.2.2.1, and if it's ssome sort of embedded device it may not give you access to such a low level kind of interface, in which this won't be possible.

You could also use the "ip" utility to disable ARP on the interface (ifconfig would show NOARP for it), but the same kind of ARP commands would still need to be run.

Lieta 11-29-2013 06:06 AM

Thanks tva, it works. I had to enable Netfilter Xtables support in kernel and add a rule to drop all ARP requests, except the one destined to primary IP if an interface:
Code:

arptables -A INPUT ! -d 192.168.1.100 -j DROP


All times are GMT -5. The time now is 08:33 PM.