locked0wn has asked for the wisdom of the Perl Monks concerning the following question:

Hi brothers/sisters,

My question is short and to the point. Is there a way to assigning source port for an LWP request? I want to assign source port because my sys-admin's firewall won't allow any request out. He said he will give me a very small port range for allowing my LWP scripts to play (source port range, that is). I am limited to ports: 55555, 44444 and 33333.

I think it would be great if one can assign SRC port for LWP requests, because it will lend itself to other capabilities.

Thanks!

Replies are listed 'Best First'.
Re: Assigning source port to LWP request
by ikegami (Patriarch) on Mar 22, 2010 at 16:57 UTC
    For HTTP, you can fudge it using
    push @LWP::Protocol::http::EXTRA_SOCK_OPTS, LocalPort => 55555;