Route using certain IP address
Posted
by
spa
on Server Fault
See other posts from Server Fault
or by spa
Published on 2012-09-24T15:30:14Z
Indexed on
2012/09/24
15:39 UTC
Read the original article
Hit count: 174
I have a server with two public IPs. Both IPs are added to eth0
using ip addr add
. Now I'd like to contact a server which uses IP address filtering. Only requests are allowed which use the second IP address. Is there are way to set this up using the standard route
command in Linux? I guess that's not the case.
So the only solution I see right now: Setup a virtual device let's say eth0:0
and bind the second IP address to it. Then I can reference the device in the route
command.
Edit: I can't use the second IP as primary one easily as this IP is used as failover IP.
© Server Fault or respective owner