Open port 8172 on windows 7 - Telnet - sockets

I'm having trouble completing a web deploy from VS2013 as I posted in VS to Azure Publish failure: Socket Error 10054
Apparently web deploy uses port 8172, which I cannot telnet to at the moment despite rules being present in my windows firewall allowing the port through.
I am using the commands telnet localhost 8172 and telnet 192.168.0.1 8172 and it says it cannot connect to the host on port 8172.
I'm not sure this is the issue because I can complete a web deploy to Azure in my other projects? But in any event I'm confused as to why I cannot telnet to the port.
Is my syntax wrong?
JK

If you're using Azure you need to open up a port in the 'Network group' settings.
If you're using CloudFlare or some other kind of proxy, make sure to connect with the IP address of the VM or the MS supplied domain name and not your 'website domain name'. CloudFlare won't proxy through any old random port.

Related

Can't find which port to use in port forwarding

I have a webserver with different IP address from my LAN.
webserver - 133.3.33.166
internal network ip (local host) - 192.168.1.10 (xampp)
I need to run an app online hosted in my localhost. Currently I am using ngrok link inside an HTML iframe tag in my webserver to access those apps inside my local server. After I installed SSL in my webserver, apps can not be access anymore. No error messages, only a blank white page in my browser.
I need to find what port I should use for port forwarding if it is possible. Thanks.
Tried some ports I found using netsh -ab. PLease help.

Internet ports: connect to personal server from work, not on port 22 or 443

Sorry for the basic question but im a complete noob on those matters.
I have a cloud server where i run a jup[yter notebook server, which normally is run on port 8888.
However when i try to connect to it from work, it doesnt work, which i suspect is due to the firewall.
I can connect from work to a regular ssh session through port 22 or 443.
However the jupyter notebook refuses to be run on those ports, probably because they are allocated already.
I tried to run PortQry to get the open ports on my work server (which is windows) and it reurned port 50248. I tried to have my jupyter server to listen on that one but it didnt work.
I also tried to scan the open port of my work server, but i received a warning from AWS! And the few ports that were returned as seemingly opened didnt work either when i set up my jupyter notebook to listen on them.
I would like to understand:
On my own server: How can i identify which port the jupyter server program can listen on?
On my work machine: How can i identify which one of my own server port would be let through the firewall of my work?
You need to use SSH local port forwarding.
https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding
You will open a SSH connection to your server but a local port, lets say 4444, will connect over the SSH connection and resolve to 8888 on the remote server.
With this you'd be able to open a browser locally and go to localhost:4444 and it would resolve to your remote hosted site. The command for this locally would be something like -
ssh -L 4444:localhost:8080 yourremoteserveraddress
An alternative option would be to use a SOCKS proxy via dynamic forwarding but this would involve needing to reconfigure your browser.
Always keep in mind any company policies around this type of thing. Even though 22 and 443 are open to the internet, use of them in this manner may break a policy and there is always the possibility of the company using a MITM proxy to monitor for this type of usage, specifically on 443.

An attempt was made to access a socket in a way forbidden by its access permissions on port 80

I have my own web site hosted on a dedicated server. I have 2 IP addresses set up.
One is for my web server and the other is for my web socket.
I did this so that my web socket clients can access my server using port 80.
However, when I run my server application I get the error:
An attempt was made to access a socket in a way forbidden by its access permissions
Now if I switch it to a different port it works (which I have allowed through the firewall). There is nothing entered in the Windows Logs.
I am running as an Administrator. I am using Windows server 2012.
Is there anything I can check?
I checked using netstat etc but this IP address is not being used on port 80 anywhere else
I have 2 IP addresses pointing to my server hosted at FastHosts.
So I have a web site (using IIS)
Originally I had a web socket connection/listener listing on port 8090.
I had created a rule in my firewall settings to allow access to this connection.
Indeed for over a year now I have been using this connection using port 8090.
It occurred to me last week that using a clients PC that they could not access the socket over port 8090. I assumed because of firewall issues.
So, I figured if i switched to port 80 for this socket it will not need an exception to that clients firewall rules.
The trouble is I cannot have a web server listening on port 80 and a web socket so I purchased another IP address from my host and 'added' to my network adapter.
I have made sure nothing else is using port 80 for this new IP address. But I get the access denied
As a test I created a default.html page which said 'hi' all with no issues. I then 'stopped' the web server for that IP address

Unable to access jetty server with local IP address

I have configured jetty-maven-plugin in my eclipse Mars and I can run the server using jetty start and stop goals. I can able to access the website using http://localhost:8080/myapp but not using local IP address(i.e., http://192.168.0.5:8080/myapp) from my own computer or other computers connected in the same network via LAN and Wi-Fi.
As mentioned as a solution in these posts,
how to make jetty server accessible from LAN?
Configuring Jetty to accept connections from all hosts
I configured the server host to 0.0.0.0 from localhost to listen on all hosts. With this setting I can see on server start log,
INFO:oejs.AbstractConnector:Started SelectChannelConnector#0.0.0.0:8080
and it works only on http://localhost:8080 but it's not accessible from http://192.168.0.5:8080.
I also tried running that if the interface is accessible using the Networks Interface Listing as mentioned in this comment. and I got,
Display name: NETGEAR WNA1000M N150 Wireless USB Micro Adapter
Name: wlan4
InetAddress: /192.168.0.5
I also tried turning off my Windows Firewall/antivirus but din't help. My jetty version is <jetty.version>9.3.0.M1</jetty.version> and JDK 1.7. What could be the problem? Any help is appreciated.
McAfee Endpoint Security was the culprit here. It was blocking the requests with IP addresses from my very own computer. Turned off the firewall inside the Antivirus and I was able to access the site with http://192.168.0.5:8080/mysite from the browser and other devices connected through the network.
Sometimes some other program opens your port on external address before you do that with Jetty. It will receive all traffic instead. On Windows you will not know it if you reuse port (that is Jetty's default behavior). Check with netstat -ano what is the IP of the process that is indeed listening on 0.0.0.0:8080. Verify if it is your Jetty process only.
Then try connecting with telnet or netcat and see if you can open the connection and what is the response.

Jenkins cannot find smtp.gmail.com

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.