I have a simple web application using peerjs here: https://github.com/chakradarraju/bingo. I was planning to use github.io to put up a demo, and github.io will be served only in HTTPS, the default PeerServer that is used by the peerjs library doesn't support HTTPS.
Is there any public HTTPS PeerServer that I can use?
The simple answer to this is no. It's unfortunate that the browsers recently disallowed http for any address except localhost.
One way to do it is set up an SSH port forward so that you can fool the browser into thinking it is talking to localhost. Ok for a demo, but not production. Here is some info (from https://www.ssh.com/ssh/tunneling/example)
In OpenSSH, remote port forwardings are specified using the -R option.
For example:
ssh -R 8080:localhost:80 public.example.com
This allows anyone on the remote server to connect to TCP port 8080 on
the remote server. The connection will then be tunneled back to the
client host, and the client then makes a TCP connection to port 80 on
localhost. Any other host name or IP address could be used instead of
localhost to specify the host to connect to.
Alternatively if you have your own web server, you can use Let's encrypt: https://letsencrypt.org/ to make it run https without needing to buy an SSL cert. Their tools are so good it's a five minute exersize to get https on your server.
Give a try to www
Is can create automatically valid certificates by using letsencrypt or self-signed.
https://go-www.com/post/how-it-works/
Usage of ./www:
-p port
Listen on port (default 8000)
-q quiet
quiet mode
-r root
Document root path (default ".")
-s your-domain.tld
https://your-domain.tld if "localhost", port can be other than 443
This issue can be resolved by setting options.secure to true as mentioned here.
Related
I am attempting to set up an apache2 web server on my raspberry pi. I am able to connect to it by doing http://localhost:8080 (8080 because my router blocks port 80). Although when I do http://my.pub.lic.ip:8080 the connection times out. I set up port forwarding so that requests going to my router on port 8080 go to my raspberry pi on port 8080. This does not seem to work but I'm also not sure if the port forwarding is the cause or if it is something else. Any suggestions?
Is your web server configured to listen on the network interface besides localhost?
https://httpd.apache.org/docs/2.4/bind.html
For example, to make the server accept connections on both port 80 and port 8000, on all interfaces, use:
Listen 80
Listen 8000
To make the server accept connections on port 80 for one interface, and port 8000 on another, use
Listen 192.0.2.1:80
Listen 192.0.2.5:8000
You can try using nmap by finding your router's public IP and on the raspberry pi type nmap my.pub.lic.ip This will show you what services are actually being published to the world. This gives more insight to the problem.
I got the web server up and running although for some reason it appears that my isp would only allow it to be hosted securely (as an https page)(I'm not sure if that's the right way to phrase it). To achieve this for free, I used cloudflare's ssl service. A tutorial to set it up for apache2 can be found here
This is what I am trying to do:
Open a browser and start to browse any https website like Gmail or Google.com
I can see through Wireshark that the name resolution is being done by the DNS server.
But after that, the connection is directly established to port 443 (starting from TCP handshake)
One thing I am not able to understand is, how does the browser knows that it needs to connect to port 443, I tried exploring the DNS packet, but it contains only the destination address, and there is no info which tells that it needs to connect to port 443.
Even if say, the browser has a priority in querying for the first time, it sees that if the port 443 is open then connect to it or connect to port 80, but I am not able to see any such behavior if I connect to a normal HTTP website, in the sense that, if I go to a normal HTTP website, there is no traffic flow from the browser indicating that it had searched first the port 443 and then went to port 80.
I am sure that I am missing something here, but not sure what it is.
The presence of https: in the URL tells it that.
The browser (client) uses the HTTP or HTTPS in the address to determine which port to use...
However the server can be configured to require HTTPS, and to switch/redirect an HTTP port 80 connection to HTTPS port 443 with encryption & certificate. So if the browser connects to a server via HTTP port 80, the server can then immediately switch/redirect the connection to HTTPS port 443. The server may even be configured the other way around to switch/redirect a connection from HTTPS port 443 to HTTP port 80.
I think this is sort of like asking why does a FTP client use the FTP port
Unless you specify a port with "http://...:port" the browser uses 80 for http and 443 for https as thats what the protocol defines but....
A server may respond with a "Strict-Transport-Security: max-age=..." and the browser is then required to retry on https and remember this
In addition Chrome , see HSTS, ships with a large preseeded HSTS list
so even if you type http for a site in the HSTS list - the browser will look at its HSTS configuration see that the site is specified and instead change to HTTPS on port 443 without trying http on port 80 first
We are using an internal server to host our staging website. I was trying to use browserstack to do compatibility testing on the virtual environment that they provide. In order to setup the virtual environment, I need to specify the port which is being used by the local web server. How can I find out which port is being used by our server? Do I need to go check the settings from the IIS in the server machine?
Web server can run on any port. But the default port is 80. When you type in the URL of a web site the browser uses the default port 80 and connects to it. There are lot of occasions when other ports are used, mostly when more than one web server is needed in the same machine. Like webmin uses port 10000 by default.
For any web server not using port 80 you have to specify the port also with your url like http://yoursite.com:port in case of default webmin install it is like http://localhost:10000
Note:HTTP uses 80 and HTTPS uses 443 by default.
This is documented in their tab for local testing.
Basically you do not need to provide 80 as a port, because it will be used by default.
If the port number is not provided, a default port number of 80 is
used. If the port number is present in the URL, it will be extracted
automatically. To test servers with SSL, check the HTTPS box. Once the
option is checked, you can enter a SSL port number that is independent
of the HTTP port number. When the connection is established, the HTTP
and HTTPS connections appear as separate links.
I am running Jenkins on RHEL6 in a tomcat container. My computer is behind my company proxy, which I have defined in the Plugins configuration tab. I can download plugins so that works (at least for port 8080, that is).
I am now trying to configure an SMTP server. I am trying with my localhost SMTP server but cannot get it to work, so I decided to debug first using something that should work (gmail). I have set SMTP server to "smtp.gmail.com" and port "465". I have tried with ports 25, 587 too. I get response:
javax.mail.MessagingException: Unknown SMTP host: smtp.gmail.com;
nested exception is:
java.net.UnknownHostException: smtp.gmail.com
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1932)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
What could be wrong?
Java Mail does not support the use of HTTP Proxies; http://www.oracle.com/technetwork/java/faq-135477.html#proxy
However;
If your proxy server supports the SOCKS V4 or V5 protocol
(http://www.socks.nec.com/aboutsocks.html, RFC1928) and allows
anonymous connections, and you're using JDK 1.5 or newer and JavaMail
1.4.5 or newer, you can configure a SOCKS proxy on a per-session, per-protocol basis by setting the "mail.smtp.socks.host" property as
described in the javadocs for the com.sun.mail.smtp package. Similar
properties exist for the "imap" and "pop3" protocols.
As an alternative, you could setup an MTA on the local machine such as postfix or sendmail which will accept connections on localhost and may be more configurable than Java to punch through the proxy configuration.
Note: If you company blocks connections on non-http ports (eg anything apart from 80, 8080, 443) then you may need to find another solution, perhaps getting some support from your local system administrators.
Also; If you want to be clever, you can setup a (Temporary) socks proxy using ssh with the following command;
ssh -D 9090 <remoteserver>
This assumes that the remoteserver has unrestricted access, and you can point connecting clients that can cope with SOCKS to localhost : 9090.
This happens because of Gmail security...
just allow access to your gmail account via apps go to under your account:
https://www.google.com/settings/security/lesssecureapps
and it will work .. smtp.gmail.com is correct.No need to change it.
Also don't forget to check internet connection as well.
I am running a asp.net mvc2 application on iis7.5 using a SSL certificate for port 443.
but as soon as I add port 443 to the Bindings (on "Site Bindings") it wont browse to the site through the HTTPS scheme complainng of another process working.
I have tried renaming port 80 to 8080 to no avail.
Hope someone can help.
All the best
Paul
*Please note this addition it may save time for you:
ADDED NOTE: THE ANSWER TO THIS WAS TO TURN OFF SKYPE AS IT HAD CONTROL OF PORT 443
It kinda sounds like you already have a site using port 443. SSL can't run on a shared IP; the certificate needs to be verified even before the server knows which site's cert to use.
Make sure other sites (especially the default one) aren't bound to the site's address and port.