incidenta5 n00b
Joined: 07 Jul 2007 Posts: 23 Location: ~/
|
Posted: Wed May 14, 2008 12:17 pm Post subject: [Perl] Pick outgoing IP for network connections? |
|
|
I have a server provisioned with two IP addresses, one attached to eth0 and another to eth0:0. There are a few perl scripts running on it that I'd like to have use the second IP for outgoing connections (much in the same way that apache can listen in on <ip>:80 and <ip2>:80 in its config file.
Will this work as-is?
Code: |
$mech = WWW::Mechanize->new(LocalAddr => "ip#2");
$mech->get("http://ip#1/somepage.html");
|
-I |
|