I have been pulling my hair out for a couple of days trying to find out why my perl program on a remote server wasn't able to connect to my webserver's ip with a non-stadard port specified, such as:
$response = $ua->post("https://123.321.123.321:4430/scripts/my_script.
The $response->content from this unsuccessful attempt was: 500 Can't connect to 123.321.123.321:4430 (connect: timeout)
So, I tried changing the port forwarding so the standard ports 443/80 are forwarded to my webserver and WAS SUCCESSFUL with no port specified:
$response = $ua->post("https://123.321.123.321/scripts/my_script.cgi",
Now the interesting thing is that running the requesting program from my test machine (Windows) I was able to connect BOTH ways successfully, but from my "live" machine (ISP - Linux) I can only connect to the standard port 80 with no port specified in the url. So, can anyone tell me why this is the case? I did some searching online and found references to a bug in Linux and/or IO::Socket on Linux that may cause this problem, but it wasn't clear to me. Any further enlightenment would be great. I would really prefer to run the webserver to which I am connecting for this task behind ports 4430/8080, not ports 443/80.