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?
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.
I'm trying to use basic authentication with curl and php to access Pentaho server. I'm using XAMPP on port 81 and Pentaho on port 8080.
The problem is that it searches Pentaho on port 81. I have tried both adding the port after the host (localhost:8080) and using the curl option (curl_setopt($ch,CURLOPT_PORT, 8080);).
If I access any other URL, it works.
I think it only works with the default port 80 and the current port (in this case 81), but not with the rest. How can I change the configuration to work with a port other than the default?
Edit: I don't want to change the Pentaho's port. What I want is to make CURL works with the specified port.
if you are using pentaho bi server with the bundled tomcat, you can change the port pentaho is running on in biserver-ee/tomcat/conf/server.xml. the port number next to protocol="HTTP/1.1"
if that's not what you are trying to do, please can you be more specific in the question?
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 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.
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).