Cpanel Opening Custom Ports For Outgoing Access For PHP Fsockopen And Curl
Nov 3, 2009How do you open custom ports for fetching content from a url via a non-standard port, ex [url]:32626 ... (url has 32626 opoen)
View 2 RepliesHow do you open custom ports for fetching content from a url via a non-standard port, ex [url]:32626 ... (url has 32626 opoen)
View 2 RepliesCannot send mail via php mail send
Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:25 in /home/user/public_html/smtpmail/class.smtp.php on line 105
How do I correct this? I'm using Cpanel with php 4.4.8, apache 2.2, mod suphp
I'm testing csf with cpanel and all is good at the beginning but i noticed that outgoing curl connections are blocked and i can't add any port to iptables due to curl uses a different one each time.
how to accept outgoing curl connections?
I have a script running on my server that has access via port 1031, but I would like to block access to it from the public, and instead allow access only through a php proxy script on my server which will connect to port 1031 via 127.0.0.1 (i.e. 127.0.0.1:1031)
So some may be thinking why? Currently users gain access by heading to mydomain.com:1031 . However I would now like to include adverts along side the script (but can't physically make adjustments to the script as the company that made the script has vanished of earth)
So the only way I can think of doing this, is by having the adverts in an Frame next to the proxy script.
So does opening up access via 127.0.0.1 just for this case, give me security problems?
I have the web pro edition panel 12 on centos 6.5 64bit, and i have made some custom firewall rules in order to be able to run a teamspeak server. The problem is that the firewall randomly blocks the teamspeak port and keeps it blocked unless i restart the firewall.
View 4 Replies View Related<?
function usecurl1($url)
{
$ch = curl_init();
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_URL, $url );
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/1.6");
$output['html'] = curl_exec ( $ch );
$output['opt'] = curl_getinfo ($ch);
curl_close($ch);
return $output;
}
function usecurl($url)
{
$output=usecurl1($url);
return $output['html'];
}
$output=usecurl1("http://en.wikipedia.org/wiki/Special:Random"); //doesn't work
print_r ($output);
echo '<br>';
$output=usecurl1("http://yahoo.com"); //works
print_r ($output);
?>
I've got a file I want to access via cURL that is within a password protected directory.
I've tried sending:
Code:
$headers = array(
"HTTP_AUTH_LOGIN: admin3e",
"HTTP_AUTH_PASSWD: opensesame",
"Content-Type: text/html"
);
curl_setopt($curl, CUROPT_HTTPHEADER, &$headers);
(insecure)
and:
Code:
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, '[user]:[pass]');
but I can't figure out how to get past the login:
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
Apache/2.0.52 (CentOS) Server at ****** Port 80
As the admin user, change the setting for a particular email account called "The maximum number of outgoing email messages" to a value beyond the default. For example if the default is 35, set it to 75. This is common -- often we have customers who send larger quantities of messages than the average user.
Login as a reseller with access to manage the email account and attempt to change any *other* value. For example, you could completely ignore the outgoing mail messages value and change just the Auto-Reply value
Plesk refuses to allow the change and kicks me back to the first tab with the following error:
The value must be in the range 0..35. Only the Plesk administrator can adjust this setting.Click to expand...
On the dashboard (intro page) there is the option "Outgoing Mail Control" and there the link "See report". When clicking on "See report" I get a "Warning: Permission denied." error message when being logged in as the full administrator. Is this due to an error in an update or what is going on here?
View 1 Replies View Relatedi have one problem in cpanel take one error for restart httpd
xx.xxx.xxx.xx:0 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
i use a script that needs fsockopen and curl to work. also i installed curl, but couldn't enable fsockopen. how i can do that? i'm using centos, php5, cpanel etc etc..
i looked php.ini, disable_functions is empty..
I need here a really help because there is in my opinion simple problem that can be solved.
Here is example of simple script:
Code:
<?php
if($_GET[u]){
echo "opening socket to {$_GET[u]} port 25<br/>";
flush();
$r=fsockopen($_GET[u],25,$errno,$errstr,30);
echo "socket opened to {$_GET[u]} error $errno str $errstr";
}
else if($_GET[d]){
echo "opening socket to {$_GET[d]} port 80<br/>";
$r=fsockopen($_GET[d],80,$errno,$errstr,30);
echo "socket opened to {$_GET[d]} error $errno str $errstr";
}
?>
One site hosted by totalchoicehosting display everything correct when i test it: ...
Yesterday I had to install a renewed SSL Certificate. Managed to get it installed, in Plesk under domains/www_mydomain_com, but I also deleted the default SSL from the server/certificates area... So then I was getting an dns 500 error when browsingour site and I could not start httpd from within plesk. Went in through SSH and tried to start it from there and got and error stating it could not find the SSLCA cert it was looking for. So I edited my httpd.include file to point to my new certificate. Now http works, but my email has stopped? What gives how could the two be related!
I can log into my webmail, compose message and when I send I get:
Warning: fsockopen(): php_hostconnect: connect failed in /usr/share/psa-horde/pear/Net/Socket.php on line 108
Warning: fsockopen(): unable to connect to 127.0.0.1:25 in /usr/share/psa-horde/pear/Net/Socket.php on line 108
I have started and stopped psa, qmail. Rebooted the server. I tried the telnet localhost 25 but I get connection refused. Anytime I check qmail status it says stopped. Don't know if that is right or not. I know I am not recieving emails asI have sent many today through other accounts and they all come back undeliverable.
We do run an online store as well so I am kinda nervous when our email goes down! Time to hire a server admin?
I am running Plesk 7.5.4 on Red Hat 9 on a Virtual Dedicated Server with GoDaddy.
Here is my "Component Info" from Plesk:
bind 9.2.1-16
coldfusion-support 7.3-2.96.118
courier-imap 3.0.8-rh9.build75050824.12
frontpage 5.0.2.2634
httpd 2.0.40-21.17.legacy.1.swsoft
mod_perl 1.99_07-5
mod_python 3.0.1-4
mysql 3.23.58-1.9
perl-Apache-ASP 2.57-rh9.build75050824.12
php 4.3.2-psa.rh9.1
psa 7.5.4-rh9.build75050824.12
psa-api-rpc 7.5.4-rh9.build75050930.11
psa-bu Component was not installed
psa-horde 3.0.5-rh9.build75050824.12
psa-imp 4.0.3-rh9.build75050824.12
psa-logrotate 3.7-rh9.build75050824.12
psa-manual-custom-skin-guide 7.5.4-rh9.build75050824.12
psa-proftpd 1.2.10-rh9.build75050824.12
psa-qmail 1.03-rh9.build75050824.12
psa-qmail-rblsmtpd 0.70-rh9.build75050824.12
samba 2.2.7a-8.9.0.1.swsoft
SSHTerm 0.2.2-rh9.build75050824.12
stunnel 4.04-3
webalizer 2.01_10-11
We have a script that run for more day without problem Script connect to port 25
Now we get this:
Warning: fsockopen() [function.fsockopen]: unable to connect to my.domain.com:25 in /home/mydom/public_html/backend/go.php on line 47
Connection refused (111)
I want to make more secure my server and I want to know How to change the services ?
2086 WHM
2082 Cpanel
21 FTP
2095 Web mail
How can I change the ports for them ?
Our new data center provided us with a Cisco ASA5510 firewall. We're setting up all new servers and will begin migrating all of our domains from our current co-lo to the new place.
At the old co-lo, they provided us a very basic BSD based router, and our servers all had external public facing IPs on them. Firewalling was handled at the server (Windows Firewall or Linux IPtables).
The new place is NAT'ing us, so our servers all have a 192.168.10.x address inside, and they map the external address for us through to the inside.
By default, they are locking everything down. I had to ask them to open ssh so I could remote into my CentOS box last night.
I'm not a network guru-- what ports are going to NEED to be opened so I can give them a list? This is a standard PLESK hosting server so http (80), https, ssh, ftp, pop3, smtp, what else? Anyone have a list?
On my server not works links www.server.com/cpanel and www.server.com/whm only ports www.server.com:2082 www.server.com:2086 how repair this?
View 2 Replies View RelatedI have a server that has Cpanel doing nightly backups using the built in auto backup tool in WHM. However, I have one account on the server with a 7 GB database. Everytime this database was dumped to the backup it would lock the database from users accessing it for about 30 minutes.
So instead, I'm now using a slave/master replication setup to do the database backup incrementally and have excluded this account from being backed up every night.
However, I would still like to be able to back up the account itself. Is there a way to setup a unique cron task to backup just this one account and skip the mysql database export?
Does cpbackup do anything more than just zipping up the account's folder in the home directory? Or are there other files it needs to keep in order to do a restore?