There is a cPanel (CentOs) server, and an additional IP address has been added.
but users cannot use:
curl_setopt($ch, CURLOPT_INTERFACE, "eth0:cp1");
// OR
curl_setopt($ch, CURLOPT_INTERFACE, "IP_ADDRESS");
I turned off the firewall, tried adding by WHM and /etc/sysconfig/network-scripts/, reserving ips, adding A records to DNS Zone, and so on... but still it's not working.
After executing the cURL request, it just times out.
what kind of configuration are required before being able to use CURLOPT_INTERFACE?
In case some one else has this issue,
I re-installed the Server and did 4 things differently:
Did not enable CPHulk
Used a random (invalid) DNS when finishing cpanel installation (My domain has managed DNS pointing to the IP)
When creating the new host in cPanel I did not check "Use the nameservers specified at the Domain’s Registrar"
I added the IPs (using WHM) after creating the host this time
I'm still not sure which one was causing the previous weird issue.
Basically I did nothing. Install cPanel > Create Host (Create a New Account) > Add IP Addresses (using WHM) > Rebuild the IP Address Pool > Restart
Related
I've recently ran a SSL test (ssllabs.com/ssltest) on our website: kimarineadventures.com.au
Two certificates showed up from different servers. (first one is ours) I'm looking for a solution on how to remove the other one. This is causing errors to some users (website loads unsecure).
Your domain was registered through crazydomains.com.au , and they manage your domain's DNS as well. The second IP address you see on the ssllabs.com report is one of theirs.
To solve the problem you'll need to log on to crazydomains.com.au, open the DNS settings and delete the AAAA record(s) with that IP address (2404:8280:a222:bbbb:bba1:78:ffff:ffff). Leave the A record(s) as they are, and don't touch anything else.
It may take a few minutes to take effect, but that should do it.
I'm trying to create a live web server on my Windows 8.1 computer.
I am connected directly to my modem using ethernet (I do have a wireless router) but I am not connected to it on this computer (desktop).
I have XAMPP working and my website appears at http://localhost/home
However, if I put in my IP from www.whatismyip.com it does not load my web server.
What am I missing?
You need to create a Port Forwarding for Port 80 to your Computers local IP Address. There should be a Admin Panel for your Router (normally the Gateway - check out with Start - Run - cmd -> then insert "ipconfig" and check out the Gateway.
And i guess in XAMPP the Internet Access is blocked. But this is a simple Apache Server, so you need to open your httpd.conf File (Should be: “c:\xampp\apache\conf\extra\httpd-xampp.conf)
Search here for:
There should be a "Deny from all" - add a # in Front to deactivate that rule.
Restart your Xampp and it should work.
Here you find more Information about Port-Forwarding:
https://managewp.com/how-to-access-a-local-website-from-internet-with-port-forwarding
Any maybe you will also need to activate Port 80 on your Firewall (depends on your Configuration)
You need a method of telling request sent to your public ip to be forwarded to the private ip of the web server. Try logging into you device (router etc) and setting this up.
What is the easiest option to redirect a request to a different host/port?
Here is my entire scenario:
I am making a request using php to a certain ip and port. The response includes another url location, but it is badly configured and instead of including ip and port, it simply includes a server name. Now, if I access the entire url location that I have as response with the server name replaced with the proper ip and port it works.
I've tried editing /etc/hosts setting the server name to the ip address, but how do I workaround the port too?
I am using mac osx 10.9.4, and I've tried some things with ipfw and pf, but neither really worked.
Thanks.
I had a similar problem quite recently on Mavericks (10.9). The way I solved it included 2 steps:
hosts file
Simply added a line similar to this:
127.0.0.1 www.someaddress.com
port forwarding
To set up port forwarding I used ipfw, which worked fine, e.g:
ipfw add 100 fwd 127.0.0.1,9001 tcp from any to any 80 in
In the example above port 9001 is forwarded to port 80. Even though ipfw is deprecated it still works.
We send some files across to a third party with a PHP cron job via FTP.
However sometimes we get the following error:
ErrorException [ 2 ]: ftp_put(): php_connect_nonb() failed: Operation
now in progress (115) ~ MODPATH/fileop/classes/Drivers/Fileop/Ftp.php [ 37 ]
When I say "sometimes" I mean exactly that; most times it goes across fine but about 1 in 5 times we get that error. It's not to do with the files themselves, because they will go happily if we try again.
We've found similar issues online - relating to a bug in PHP with NAT devices or to do with firewall configuration but again the implication is that if this were the case it would never work.
So, why would this work some times and not others?
ftp_set_option($ftpconn, FTP_USEPASVADDRESS, false);
This line of code before setting passivity of the connection ftp_pasv($ftpconn, true);
Solved my problem
FTP(S) uses random ports to set up data connections; an intermittent success rate indicates that not all ports are allowed by a firewall on the client and/or server machines. The port range for incoming (PASV) data connections can be set in the FTP server.
This page has a nice summary:
The easy way is to simply allow FTP servers and clients unlimited
access through your firewall, but if you like to limit their access to
"known" ports, you have to understand the 4 different scenarios.
1) The FTP server should be allowed to accept TCP connections to port
21, and to make TCP connections from port 20 to any (remote ephemeral)
port.
2) The FTP server should be allowed to accept TCP connections to port
21, AND to accept TCP connections to any ephemeral port as well!
3) The FTP client should be allowed to make TCP connections to port
21, and to accept TCP connections from port 20 to any ephemeral port.
4) The FTP client should be allowed to make TCP connections to port
21, and to make TCP connections to any other (remote ephemeral) port
as well!
So, I'm writing this answer after doing some investigation on my FTP server and reading the link you provided elitehosts.com.
I'm using FileZilla FTP server, and there is a specific setting that I had to enter to make it work. Going into the server settings, there is an area titled "Passive mode settings". In that dialog, there is an area titled "IPv4 specific", and within that area there is a setting labeled "External Server IP Address for passive mode transfers:". It's a radio button selection set, and it was on "Default", but since the FTP server is NAT'ed, I changed that radio selection from "Default" to "Use the following IP:" and entered in the external-facing IP address of my gateway provided by my ISP.
After I set this up, it worked! Not terribly sure if your FTP server is NAT'ed, but I thought I would provide the answer on this thread because it seems related.
In addition to Cees answer, I am running vsftp on ec2 and had to comment out the listen_ipv6=YES, listen=YES then "service vsftpd restart".
Although documentation says it will listen on ipv4 as well it wasn't and this resolved the issue.
For me all I had to do was to remove the ftp_pasv( $ftpconn, true ); and everything worked perfectly. I'm not yet sure why but I am trying to find out and I will surely come back when I do get the reason behind it.
This should be a comment under jj_dev2 comment, but I cannot add one due to reputation. But maybe it will be helpful for someone, so I post it here.
We had the same issue as described in the original post. In our case it worked with many customers - except one.
The solution in jj_dev2 comment did work for us. So we investigated what does ftp_set_option($conn, FTP_USEPASVADDRESS, false) actually do. And based on that we found out that in fact customer's FTPS server was configured incorrectly.
In response to PASV command (ftp_pasv($conn, true)) FTP server returns an IP address which the PHP FTP client then will use for data transfers. In our case the FTP server was returning an internal IP address and not the public IP address that we connect to. Customer had to fix their FTP server settings so FTP server would send external IP address in the PASV command response.
I am moving my files from one server to another. Our new hosting company has given us provisional IPs for each domain/sub-domain (which I have modified my hosts file with + dumped dns). Additionally, they have provided username/passwords for these "fake" IPs for ftp/ssh. Although, when I try to connect to these servers, via IP, I get connection errors, ranging from "host not found" to "username/password incorrect". I have tried though WinSCP, FileZilla, and Dreamweaver. Is there something that I am missing? I'm to 'thick' to ask my hosting company (call it ego) what's wrong.
Question: If I'm given a provisional IP/username/password for a domain, is there some other requirement in order to connect to a domain in order to modify files?
Well.. heres your options.
Firewalls in your company/house are blocking sftp (port 22)
They meant FTP not sftp
can you ping the IP (dependant on firewall too)
For the times you've had username/password rejections what were you using, as that at least made contact, or the error was misleading..
Answer: The company provisioning my IPs did not add my IP to their firewall, so I wasn't allowed access.