This one.... hmm....
I do not see how the rule would switch from eth0 to eth1 for the 2.2.2.2.
And it is good to know curl has an interface option. Perhaps it also exist
via PHP. That could be helpful at some point.
P
On Tue, May 25, 2010 at 9:03 PM, Jerry Wilborn <jerrywilborn@gmail.com>wrote:
>
> iptables -t nat -A POSTROUTING -o eth0 -d 1.1.1.1 -j SNAT --to-source 2.2.2.2
>
>
> This will source traffic destined for 1.1.1.1 with a source of 2.2.2.2.
> Paint to match, etc.
>
> If you're using a program like 'curl' then you can use a switch like
> '--interface'.
>
> Jerry Wilborn
> jerrywilborn@gmail.com
>
>
> On Tue, May 25, 2010 at 6:25 PM, Petri Laihonen <pietu@weblizards.net>wrote:
>
>> Hey,
>>
>> Is it possible to direct a process on the server to use eth1 instead of
>> eth0 for outgoing request?
>>
>> For instance, one can request PING command to use specified interface. How
>> about links (or Lynx), or cli script etc...
>>
>> If this does not work in the application level, how about some sort of
>> rule in the firewall, which would direct a request for
>> http://exampledomain.tld via eth1 instead of default eth0?
>>
>> Petri
>>
>
>
___________________
Nolug mailing list
nolug@nolug.org
Received on 05/25/10
This archive was generated by hypermail 2.2.0 : 05/25/10 EDT