1

I've got two linux servers in question. When one server initiates a request for a specific IP address that the other server has, I would like the initiating server to route the request back to itself on one of its own IP addresses.

How might this be done? Iptables? Iproute2? I'm a newbie to both and am somewhat confused by all their options. If either one can do it, I'd love to see examples of each so I can learn a little extra!

David
  • 414
  • 4
  • 10

1 Answers1

0

Since you haven't described the usecase for that, and i don't know the limitations, i can only suggest adding the target IP to one of your interfaces on the initiating server. If supported in the kernel, you can use dummy interface (dummy0) for that.

modprobe dummy
ip addr add 1.2.3.4/32 dev dummy0
mulaz
  • 10,682
  • 1
  • 31
  • 37
  • Beautiful! I had no idea it would be that easy! To enable *two* dummy interfaces I had to use the command `modprobe dummy numdummies=2`, and to make that persistent, the line `option dummy numdummies=2` needed to be added to `/etc/modprobe.d/local.conf` (debian/ubuntu). Works perfectly! – David Mar 01 '13 at 16:03