unable to ping any sites in command line/powershell windows 7 - windows

Does windows command line requires any proxy setting to ping websites?
I can access all websites in my browser but when I try to ping the same from commandline or powershell I get "Request timed out" error. How to resolve this error?
In IE browser I've set a automatic proxy detection script as the network is company LAN. Tried most of solutions provided in web without any luck.
Due to this I am unable to run the chef commands to install gems and receiving error Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT:
A connection attempt failed because the connected party did not properly respon
d after a period of time, or established connection failed because connected hos
t has failed to respond. - connect(2) for "api.rubygems.org" port 443 (https://a
pi.rubygems.org/specs.4.8.gz)

Getting a ping reply or HTTP response are two entirely different things. That is, any server can honor either of those just as well as it pleases. In addition, there might be proxies and firewalls on the route that change the results. Even if a server is willing to reply on ping, corporate firewall might block it.
You might have some success with setting Chef's proxy settings via environment variables, as per documentation. As how to find out the proxy settings, ask your network admin. If that doesn't work, retrieve the proxy settings from IE's registry key. In case of link rot, here's the function:
function Get-InternetProxy {
<#
.SYNOPSIS
Determine the internet proxy address
.DESCRIPTION
This function allows you to determine the the internet proxy address used by your computer
.EXAMPLE
Get-InternetProxy
.Notes
Author : Antoine DELRUE
WebSite: http://obilan.be
#>
$proxies = (Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings').proxyServer
if ($proxies) {
if ($proxies -ilike "*=*") {
$proxies -replace "=","://" -split(';') | Select-Object -First 1
} else {
"http://" + $proxies
}
}
}

Related

Kubernetes on Windows Error: Unable to connect to the server: dial tcp some ip

I have downloaded Docker and then enabled Kubernetes on the Desktop. When I execute 'Kubectl version' command on the PowerShell it says:
kubectl : Unable to connect to the server: dial tcp : connectex:
A connection attempt failed because the connected party did not properly respond
after a period of time, or established connection failed because connected host has
failed to respond.
At line:1 char:1
kubectl version
The same issue started to occur today when I run anything related to kubectl on Windows. However, it previously worked fine. Maybe there are some recent updates in Windows/Docker.
UPD
Actually, my network sharing options were reset for some reasons. Please try the solution described below (works for me)
SOLUTION:
Check your Network and Sharing settings:
Control Panel > Network and Sharing > [YOUR_NETWORK] (For me it's my Wi-Fi connection) > Properties > Sharing
On the Sharing tab make sure that you have all checkboxes checked and that you selected the correct virtual network in the "Home network connection" field. If not, please use the correct one.

gcloud login network connection failed issue

I tried to connect gcloud with gcloud init. I got Network connection error.
I tried to fix with Network connection problems in Google Cloud SDK while I have access to google or website like google app engine in my browser
gcloud config set proxy/type socks5
gcloud config set proxy/address 127.0.0.1
gcloud config set proxy/port 1086
But it still does not work for me.
My log is:
Welcome! This command will take you through the configuration of gcloud.
Settings from your current configuration [default] are:
core:
disable_usage_reporting: 'False'
proxy:
address: 127.0.0.1
port: '1080'
type: socks5
Pick configuration to use:
[1] Re-initialize this configuration [default] with new settings
[2] Create a new configuration
[3] Switch to and re-initialize existing configuration: [cindy]
Please enter your numeric choice: 1
Your current configuration has been set to: [default]
You can skip diagnostics next time by using the following flag:
gcloud init --skip-diagnostics
Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.
ERROR: Reachability Check failed.
Cannot reach https://www.google.com (error)
Cannot reach https://accounts.google.com (error)
Cannot reach https://cloudresourcemanager.googleapis.com/v1beta1/projects (error)
Cannot reach https://www.googleapis.com/auth/cloud-platform (error)
Cannot reach https://dl.google.com/dl/cloudsdk/channels/rapid/components-2.json (error)
Network connection problems may be due to proxy or firewall settings.
Current effective Cloud SDK network proxy settings:
type = socks5
host = 127.0.0.1
port = 1080
username = None
password = None
What would you like to do?
[1] Change Cloud SDK network proxy properties
[2] Clear all gcloud proxy properties
[3] Exit
It is due to redirection from goolge account to localhost for acquiring token Try to login using firefox
Considering the error and mainly the following part of the error, it seems that you are facing issues with your proxy and firewall settings and configuration.
Network connection problems may be due to proxy or firewall settings.
Due to this error, you need to configure your SDK to be used with proxy and firewall. I would recommend you to take a look at the documentation Configuring Cloud SDK for use behind a proxy/firewall, to get more information and steps on how to achieve it and avoid the error that you are facing.
Besides that, I could find the below two posts from the Community, of users that are facing similar cases that you are facing.
ERROR: Reachability Check failed. #51
gcloud utility not working #25
Let me know if the information helped you!
For the people who still have this problem.
Try to use IPV4 first as IPV6 is still buggy for many systems.
For Linux, you can just uncomment or add the following line in /etc/gai.conf file:
precedence ::ffff:0:0/96 100
For other systems, you can google the set-up

Cannot SSH into Azure Windows Server VM

I created a new Virtual Machine in Azure. (Windows Server 2016 Datacenter Server Core)
The VM creation process allowed me to enable SSH access (and I did):
Image of VM Creation Wizard
However I find myself unable to establish a SSH connection to the Windows Server.
I learned that in situations like this, it is sometimes necessary to reset the "configuration password":
"Reset Password" for VM
This action allowed me to successfully use the "troubleshoot the connection" tool (built into Azure) to "stage" a SSH connection (from my IP to the Azure VM). However I still find myself unable to establish a SSH connection. (The connection continues to "time out".)
Image of Inbound Network Rules
Image of Azure "Connection troubleshooter"
Any ideas?
I had to follow these instructions to manually install the sshd service:
https://365adviser.com/powershell/install-use-openssh-windows-powershell-core-remoting-via-ssh/
It's worth noting that Step #2 refers to a depreciated GitHub project. As such I needed to tweak the URI. I also needed to append the the -UseBasicParsing option. Here is the final result:
Invoke-WebRequest -Uri http://mengelsen.000webhostapp.com/shared-items/OpenSSH-Win64.zip -UseBasicParsing -OutFile openssh.zip

Unable to Retrieve Directory Using ProFTPD(WHM)

Well, after looking for many solutions. I came here now.
I am setting up WHM/cPanel for hosting website. Everything was going smooth but I am stuck on FTP connection (Server sent passive reply with unroutable address. Using server address instead.)
Server Details:
CentOS Linux release 7.2.1511 (Core)
WHM/cPanel Version 11.58.0.13
FTP Server: PureFTPD
Acutal error while connecting
To fix this issue and get FTP working you need to open up more numbered ports so FTP can connect. I assume you are using CSF.
Login to WHM then go to CSF >> Firewall Configuration >>
allow TCP_In 30000:50000 and TCP_Out 30000:50000
Once you made the changes Restart the firewall
Now you need to make changes in FTP config file to use these ports, you will find this file to this location /etc/pure-ftpd.conf
Now you will see a line as follows and you will need to uncomment it
# Port range for passive connections replies. - for firewalling.
PassivePortRange 30000 50000
Restart FTP Service and should work.

Cannot connect to Perforce server via visual client

I set up a new Perforce free service on my home server. I am able to connect to the service on the same machine using the visual client targetting localhost:1666. When I try to connect from my desktop I am unable to connect. I originally tried my public IP which is forwarded to my server, but when that didn't work I tried targetting my server locally as Server: "192.168.1.105:1666" In either case I get a similar error of:
Connect to server failed; check $P4PORT.
TCP connect to 192.168.1.105:1666 failed.
connect: 192.168.1.105:1666: WSAETIMEDOUT
On my server "p4 set" shows:
C:\Users\Hephaestus>p4 set
P4EDITOR=C:\Windows\SysWOW64\notepad.exe (set)
P4PASSWD=13C72FC3B6AE5DF224D835D7A26332A0 (set)
P4PORT=1666
P4ROOT=D:\p4
P4USER=Hephaestus (set)
P4_1666_CHARSET=none (set)
On my desktop "p4 set" shows:
P4EDITOR=C:\Windows\SysWOW64\notepad.exe (set)
P4PORT=50.137.244.199:1666 (set)
P4USER=jelamb (set)
I've also worked through most of this: http://answers.perforce.com/articles/KB/2960/. I tried turning my server's firewall off completely.
I've spent hours trying to figure this out and I'm just stumped. Why would I be unable to connect?
I ended up finding out that for whatever reason, adding the config stuff as system variables through Windows didn't do what I needed. Adding them via p4 command-line commands did the trick. Weird, but it works now :/.

Resources