Re: Static bidirectional static NAT for duplicate IP devices using iptables

Adam Nielsen <[email protected]>
Newsgroups gmane.comp.security.firewalls.netfilter.general
Message-ID <20250216124022.127f90f3@gnosticus>
> Summary: I am trying to access two devices with the same IP address
> connected locally to a Linux computer, each resides in its own VLAN.
> 
> I made yet another progress, I use arptables to mangle the ARP request
> of the host side, but I am still missing ARP response to the device.

Isn't arptables the wrong approach here?  If you're using NAT then by
definition you're mapping IPs to the target subnet, so then there
should be no need to mess with ARP as the packets leaving the machine
are already on the right IP for the subnet?

I am by no means an expert but I would've thought that all you're
trying to do is to convert a 192.x address into the same target IP, and
just control which interface the packet goes out on based on whatever
the original IP address was.

Is ARP mangling needed at all for this?

Cheers,
Adam.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.