Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Setting outgoing IP address in LWP::UserAgent

by ptum (Priest)
on May 29, 2009 at 00:47 UTC ( #766783=perlquestion: print w/ replies, xml ) Need Help??
ptum has asked for the wisdom of the Perl Monks concerning the following question:

I'm new to using LWP or Mechanize against HTTPS, and having some trouble. Because I'm on a multi-homed server, I need to specify the outgoing IP Address (firewall rules associated with the port). Is there a way for me to set the outgoing IP address within a user agent? Also, I'm getting a "500 SSL negotiation failed" message even though I've set the credentials:

$ua->credentials('target_domain.tld:8080','made_up_realm_name','userid','password');

Any suggestions?

No good deed goes unpunished. -- (attributed to) Oscar Wilde

Comment on Setting outgoing IP address in LWP::UserAgent
Download Code
Re: Setting outgoing IP address in LWP::UserAgent
by marcussen (Pilgrim) on May 29, 2009 at 02:30 UTC

    I can't answer your question concerning the outgoing IP, but SSL negotiation failed does not immideately indicate that your login failed, but rather that the encryption scheme used to transmit the credentials failed to initialize. You should consider that a type of "connection failed" errors. There can be a great number of reasons why this happens, such as missing certificate files, incorrect keys, and more. If you could provide more information on the matter we might be better positioned to shed some light on the issue.

    Confucius says kill mosquito unless cannon
Re: Setting outgoing IP address in LWP::UserAgent
by lakshmananindia (Chaplain) on May 29, 2009 at 03:12 UTC
Re: Setting outgoing IP address in LWP::UserAgent
by Anonymous Monk on May 29, 2009 at 03:28 UTC
Re: Setting outgoing IP address in LWP::UserAgent
by NetWallah (Abbot) on May 29, 2009 at 04:44 UTC
    "Yes we can" - type answers provided at LWP and LocalIP/LocalPort.

    Sorry _ I don't have a multi-homed computer to try this on.

         Potentia vobiscum ! (Si hoc legere scis nimium eruditionis habes)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://766783]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2014-08-01 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (257 votes), past polls