Firewall – Can browse, but can’t ping

domain-name-systemfirewallgitpingwindows 7

I am behind a corporate network. I am unable to use git, since it can't resolve server names

fatal: Unable to look up someserver.org (port 9418) (No such host is known. )

I can't ping that server (name nor ip) either, but my browser is resolving it just fine.

Is there a way to figure out a workaround for this?

Best Answer

YES,

Usually corporate networks are behind proxy. Try to find your git repo server public IP (google it), ping it. If it isn't working you are probably behind a proxy server. If you are behind proxy use:

git config --global http.proxy http://proxy_address:proxy_port

git clone http://.../..

You can find proxy address in internet explorer properties\Connections\LAN Settings

enter image description here

If git has still problem resolving address you could try putting git repo public IP DNS to C:\Windows\System32\drivers\etc\hosts file. Git will resolve DNS locally and use proxy for connection.

Here are some additional methods how you can discover proxy:

  1. Open IE, browse to some page next run from cmd:

netstat -ban

(it requires elevated command prompt - probably you can't do it on the corporate computer)

on the left sight under [IEXPLORER.EXE] is your IP on the right sight should be proxy IP and port.

enter image description here

  1. run:

ipconfig /all - find your DNS suffix

ping wpad.suffix or ping wpad

Now use the IP address returned by the ping command and us it in your browser:

http://ipaddress/wpad.dat

It will download wpad.dat file in which you can find line "PROXY ..." containing IP and port of your proxy.

Related Topic