I have a simple PHP script. It works for any external IP on port 80 but any other port fails. I'm assuming it has to do with the host, so what am I missing to be able to check ports other than 80?
Most hosting systems prevent outgoing connections on other ports than 80 to prevent abuse, for example botscripts connecting to IRC servers or spamscripts connecting to SMTP hosts on 25.
Example hoster explanation.
Related
I have a webspace on a free hosting platform. The latter doesn't allow server-to-server connections to a port different from 80 in php scripts. I need to connect to another website on a port different from 80 using php Curl libraries, but obviusly it doesn't work, my host blocks the connection. Is there a method to bypass this limitation?
Sounds like it's a firewall limitation and you can only ask your hosting company for specific permission.
But if you have control over another website, you can send request to it's 80 and route to port xx.
What are the dangers of opening port 25 to allow smtp traffic through? I have a windows server 2003 box which has port 25 blocked (Not by ISP), I know ISP's for usually block this port from use but as I need it for some php scripts I'm running that notify users by email, Is there any dangers or precautionary actions I should take?
Any advice would be appreciated,
Thanks Luke.
If you are thinking of unblocking port 25 on outbound traffic then no, not really. If you are wanting unblock port 25 on incomming traffic to receive email from external scripts into your internal mail server then you need to ensure you have the mail server configured to prevent relaying etc.
I have created a website for sending emails, it works fine in localhost and in LAN connection, but I'm not able to open my website from another network.
I use my public IP address (found on whatsmyip.org), I have also forwarded port (80) to the server computer in my router settings page.
I'm using xampp version 5.6.3. please help me out with this.
Thanks in advance
Make sure your firewall allows incoming connections from port 80. To do this, open your computers firewall-configuration and create an incoming-rule for port 80. If you are using Windows 8 please refer to this Microsoft-help-page.
To view your website from the internet, these conditions must be met:
Make sure you use the correct ip
Have an ISP that allows trafic on port 80 (thanks to DarkBee)
Forward the port to the correct computer, using the nat of your router
Configure your firewall to accept connections from port 80
Make sure your xampp listens to all ip-adresses (see "Listen 80" in httpd.conf)
I am running a MQTT server on PHP and using Android to connect to it. The problem I faced is that I am unable to get the default port 1883 opened for MQTT due to server restrictions. Only common ports (21, 80, 3306, 8080) are opened. Is there any 'hack' that will allow me to use these ports for my MQTT? I have tried ports 80, 3306 and 8080 but it doesn't work.
Well, typically the ports above 1000 are privileged and restricted anyway. What is happening when you adjust the broker settings to start on a different port? are those ports you list already opened by other applications?
From the perspective of MQTT it will just be a case of setting the port number in the broker configuration and starting the broker. I can't see what else can help here?
I am in the process of building a chat application in PHP using Web Sockets. I started with the code phpwebsocket project and here. The code works fine on my local machine but when i try it on my site (does not have a dedicated IP) it has a problem establishing the web socket connection. I tried it with all possible combinations for socket binding (site addres, external ip addr, local ip addr) but failed.
You must be able to connect to the port on the server where the WebSocket server is running. If you are using a port other than 80 or 443 on your site for the WebSocket server, then you probably need to configure (or ask) the site to accept incoming connections on that port (because they may deny it by default for security reasons). It you are unable to telnet to the WebSocket port on the server, then this is likely the case (or phpwebsocket is not in fact correctly configured to list on that port).