Port 43 Blocked on Absolut?

Status
Not open for further replies.

plcfcode

New Member
Messages
19
Reaction score
0
Points
1
Hello x10Hosting,

Earlier today, when dealing with a spammer on my forum, I decided to look at their WhoIs information. phpBB has a built-in method of pulling for WhoIs data, and I noticed that it was not pulling for the data - the page would just load with no information on it at all. After looking on the phpBB support forum, it was suggested that the host may be blocking port 43, which is used by phpBB to pull the data. This leads me to question if port 43 was closed by x10Hosting's recent security update. The WhoIs data pull worked for me until today. If it was closed, why? If it is temporary, I can accept it, but it is permanent, I would like to ask x10Hosting to once again reopen the port so that the feature may work.

I checked on my test forum, also hosted by x10Hosting, and WhoIs is not working on it either.

Thanks in advance for your responses!
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
The port should be opened now.
 

plcfcode

New Member
Messages
19
Reaction score
0
Points
1
The WhoIs thing is still not working, and based on my screenshot below, the port is still closed. I would like to thank you for the work you are putting into this.

Still_Listed_As_Closed.png
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
That doesn't mean that the outgoing port is closed.

On my test account, on vox, I get the same response to a telnet request but this test script works:

PHP:
<?php

$foo = "";
$bar = "";
$fp = fsockopen( "whois.pir.org" , 43 , $foo, $bar, 30);

fputs($fp, "redcross.org" . "\r\n");
$out = "";
while(!feof($fp)){
		$out .= fgets($fp);
}
fclose($fp);

$res = "";
if((strpos(strtolower($out), "error") === FALSE) && (strpos(strtolower($out), "not allocated") === FALSE)) {
    $rows = explode("\n", $out);
    foreach($rows as $row) {
        $row = trim($row);
        if(($row != '') && ($row{0} != '#') && ($row{0} != '%')) {
           $res .= $row."\n";
        }
    }
}
	
echo "<pre>";
echo $res;
echo "</pre>";

?>

Note that you need all 5 parameters for fsockopen, you cannot assume default values. If your script uses '@' or other error suppression methods, it will just silently fail.
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
Yes, to clarify, you can connect outbound FROM our servers on port 43, you cannot connect inbound TO them on 43.
 

plcfcode

New Member
Messages
19
Reaction score
0
Points
1
I suppose that that makes logical sense. "My script" is not mine; it is phpBB's. I will contact them asking how the WhoIs script works...unless someone here already knows.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Part of phpBB or an add-on module? URL for download?
 

plcfcode

New Member
Messages
19
Reaction score
0
Points
1
Since I am not being allowed to edit my post, here's a new one:

After testing the script provided above, I did get the WhoIs data for www.redcross.org, but phpBB is still not loading it properly. I do not know what the provided script does that phpBB doesn't, but whatever it is, it makes it work.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
1. Download copy of phpBB
2. Unzip
3. Use a "Find in files" to look for "fsockopen" [I used Notepad++]
4. Find which one uses port 43
5. File is \includes\functions_user.php
6. Note that in all the other files, they call fsockopen with all parameters, yet in this file they call it (twice) with just two. That is the problem. Lines 1177 and 1208.
7. Tangentially note that they are using whois IP lookup, not domain name.

What YOU do:

Open \includes\functions_user.php in FileManager (Code Editor has line numbers)
Find the places where they have:

PHP:
if (($fsk = @fsockopen($whois_host, 43)))

AND

if (($fsk = @fsockopen($server, $port)))

and edit to


PHP:
if (($fsk = @fsockopen($whois_host,  43, $dummy_one , $dummy_two , 5 )))

AND

if (($fsk = @fsockopen($server, $port, $dummy_one , $dummy_two , 5 )))

Save changes, test script.
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
That shouldn't be necessary -- if fsockopen isn't working unless all parameters are passed into it, that's something we need to fix on our end -- in fact it should be fixed hopefully within a few hours (waiting on an admin to apply the proposed fix to the servers).
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
Just verified and the issues you've been having with fsockopen should be resolved.
 
Status
Not open for further replies.
Top