HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   ISPConfig Issue: Paypal IPN blocked? (http://www.howtoforge.com/forums/showthread.php?t=60839)

vaio1 6th March 2013 18:31

ISPConfig Issue: Paypal IPN blocked?
 
hi guys,

why this request goes in timeout?

Code:

# curl -d "test" https://api-3t.paypal.com/nvp -v
* About to connect() to api-3t.paypal.com port 443 (#0)
*  Trying 173.0.84.69...

thanks

till 6th March 2013 18:37

If you cant reach paypal with curl, then it might be a paypal issue or a issue of your server with name resolution, network connection or similar but not a ispconfig issue. Or do you want to call it a intel issue because you use a intel processor in your server ;)

vaio1 6th March 2013 18:41

No Till, I don't want to accuse anyone.
The paypal link is correct and the server doesn't resolve the url. All these problems after the updating of ISPConfig.

Regards

till 6th March 2013 18:50

Quote:

No Till, I don't want to accuse anyone.
Then please write in a topic of a post a useful information like "name resolution not working" so that others which use in the next years for such topics might find answers to fix name resolution problems on servers.

Quote:

The paypal link is correct and the server doesn't resolve the url.
So you have a problem with name resolution. For problems with name resolution, take a look into /etc/resolv.conf if the nameservers are correct and check that you entered the correct nameservers under System > server config in ispconfig.

Quote:

All these problems after the updating of ISPConfig.
Everything that happens from now on is after the update from ispconfig, so this does not indicate a relation.

vaio1 6th March 2013 19:08

Thanks for your reply.

The name servers set in the ISPConfig is not the same in the /etc/resolv.conf

ISPConfig:
Code:

192.168.0.1,192.168.0.2
/etc/resolv.conf
Code:

search mydomain.com
nameserver 212.97.32.2

is it normal?

This is the result of the Curl:

Code:

# curl -d "test" https://api-3t.paypal.com/nvp -v
* About to connect() to api-3t.paypal.com port 443 (#0)
*  Trying 173.0.84.69... Connection timed out
*  Trying 173.0.84.101... Connection timed out
*  Trying 173.0.88.69... Connection timed out
*  Trying 173.0.88.101... Connection timed out
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host


till 6th March 2013 20:42

Yes. The information in ispconfig is normally not used. I just wanted to be sure.
You can ad a second nameserver in resolv.conf by addin a line

nameserver 8.8.8.8

This is the free google nameserver.

Have you checked if you can reach the pi url in a browser on your desktop?

vaio1 6th March 2013 21:00

Code:

Have you checked if you can reach the pi url in a browser on your desktop?
Yes it works in my browser

Code:

You can ad a second nameserver in resolv.conf by addin a line
I have set it up but nothing has changed.

regards

vaio1 7th March 2013 15:09

Any help? I think that something in the ssl connection parameters is not correct.

Maybe I have found the problem: Seems to me that ISPConfig blocks the SSL outgoing port.

How have I to unblock it?

thanks

vaio1 11th March 2013 11:29

Hi Till,

this is a snipped of code to test the ssl connection to Paypal:

Code:

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

try{
    $arrData = array(
        'tx'    => '----',
        'cmd'  => '_notify-synch',
        'at'    => '-----'
    );

    $ch = curl_init( 'https://api-3t.sandbox.paypal.com/nvp' );

        curl_setopt($ch, CURLOPT_HEADER, true); // Display headers
        curl_setopt($ch, CURLOPT_VERBOSE, true); // Display communication with server
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return data instead of display to std out

        curl_setopt($ch, CURLOPT_POST, 1);

        curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,0);
        curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,0);

        curl_setopt($ch, CURLOPT_POSTFIELDS, $arrData);
        $strCurlResult = curl_exec($ch);
   
   
        print "<pre>\n";
        print_r(curl_getinfo($ch));  // get error info
        echo "\n\ncURL error number:" .curl_errno($ch); // print error info
        echo "\n\ncURL error:" . curl_error($ch);
        print "</pre>\n";
   
    curl_close( $ch );
    print_r($strCurlResult);
}catch(Exception $e){
    echo $e->getMessage();
}


?>

this is a php test result:

Code:

Array
(
    [url] => https://api-3t.sandbox.paypal.com/nvp
    [content_type] =>
    [http_code] => 0
    [header_size] => 0
    [request_size] => 0
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 21.016503
    [namelookup_time] => 0.018763
    [connect_time] => 0
    [pretransfer_time] => 0
    [size_upload] => 0
    [size_download] => 0
    [speed_download] => 0
    [speed_upload] => 0
    [download_content_length] => -1
    [upload_content_length] => -1
    [starttransfer_time] => 0
    [redirect_time] => 0
    [certinfo] => Array
        (
        )

)


cURL error number:7
cURL error:couldn't connect to host


till 11th March 2013 12:37

Quote:

Maybe I have found the problem: Seems to me that ISPConfig blocks the SSL outgoing port.
ISPConfig is not even able to block outgoing ports, the bastille firewall can only block incoming connections and even this is disabled by default. So if your ssl outgoing port is blocked, then it is defiantely not related to ispconfig and you should check other software related to networking or iptables that ypu installed on your server.


All times are GMT +2. The time now is 02:29.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.