PHP function fwrite() problem
Hello,
I have problem with use php function fwrite().
I have php server status script which use fsocket fwrite and some other functions.
Installed CMS is php-fusion.
All servers shows offline but when i disable firewall servers show Online.
I have CSF firewall how i can configure it to all users will be able have server status script on their webpages please?
Error is: fwrite(): send of 25 bytes failed with errno=1 Operation is not allowed Line: 342
Line 342:
fwrite($live_server, $packet);
343 socket_set_timeout($live_server,1,0);
344 $junk = fread($live_server,5);
345 $status = socket_get_status($live_server);
346 $do = 1;
347 $server_info= "";
348
349 while($do)
350 {
351 $str_1 = fread($live_server,1);
352
-
All servers shows offline but when i disable firewall servers show Online. I have CSF firewall how i can configure it to all users will be able have server status script on their webpages please?
Hello, You may need to allow outgoing connections over port 80 from the server's local IP address (127.0.0.1) for this to work. Thank you.0 -
I added this: tcp|out|s=80|s=127.0.0.1 udp|out|s=80|s=127.0.0.1 To csf.allow and restarted firewall but it still doesnt work This is example of servers ip which websites try get server status: 82.208.17.175:27022 82.208.17.102:27433 But port can be on that gameservers any... 0 -
I solved it with open UDP port 27433 but i need open more ports. I need open range 27000-28000 and 25565-25600 is it safe? I think when is it outbound connections no security risk is there but if is can you explain please? 0 -
Hello, Here's a StackOverflow thread discussing the value of blocking outbound connections: Why block outgoing network traffic with a firewall? Thank you. 0
Please sign in to leave a comment.
Comments
4 comments