I have some proxy applications like Ultra-surf or Tor-browser. I can set their proxy in browsers or on other applications. For example for Tor, I can set socks: to "127.0.0.1:9150" in any application.
but I want to using this proxy for CMD.
I saw these answers
netsh winhttp set proxy proxy-server="socks=localhost:9090" bypass-list="localhost"
Or
set HTTP_PROXY=http://proxy_userid:proxy_password#proxy_ip:proxy_port
I opend a CMD as an Administrato, and then I tried these commands. After each one, I tested 3 sites: "google.com" and "facebook.com" and "youtu.be". But noting was changed. "google.com" always works and "facebook.com and youtu.be" do not work. Also, It does not make difference if my proxy apllication be open or not.
Anyone knows how can I set this kind of proxy for CMD?
netsh winhttp set proxy 127.0.0.1:1080
netsh winhttp set proxy proxy-server="socks=127.0.0.1:9150" bypass-list="127.0.0.1"
netsh winhttp set proxy proxy-server="socks=localhost:9150" bypass-list="localhost"
netsh winhttp set proxy proxy-server="http=127.0.0.1:1080" bypass-list="127.0.0.1"
netsh winhttp set proxy proxy-server="https=127.0.0.1:1080" bypass-list="127.0.0.1"
set HTTP_PROXY=127.0.0.1:1080
set HTTPs_PROXY=127.0.0.1:1080
set HTTP_PROXY=#127.0.0.1:1080
set HTTPs_PROXY=#127.0.0.1:1080
set HTTP_PROXY=:#127.0.0.1:1080
set HTTPs_PROXY=:#127.0.0.1:1080
The ping response always is:
For not sensored site:
C:\>ping google.com
Pinging google.com [172.217.18.142] with 32 bytes of data:
Reply from 172.217.18.142: bytes=32 time=198ms TTL=51
Reply from 172.217.18.142: bytes=32 time=94ms TTL=51
Reply from 172.217.18.142: bytes=32 time=95ms TTL=51
Reply from 172.217.18.142: bytes=32 time=102ms TTL=51
Ping statistics for 172.217.18.142:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 94ms, Maximum = 198ms, Average = 122ms
For sensored sites:
C:\WINDOWS\system32>ping youtu.be
C:\WINDOWS\system32>ping facebook.com
Pinging facebook.com [10.10.34.35] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 10.10.34.35:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
I'm brand new to using homestead for developing laravel sites locally. I followed two different tutorials for setup and have reinstalled about 5 times, but the custom domain name does not work for me. I'm working on a windows 10 machine and am using Virtualbox. I'm able to see the test site when I browse to 192.168.10.10 in my browser. I can ping 192.168.10.10 and get all of the packets send and receive fine. I can also ping obsessories.dev it sends and receives all of the packets successfully. I also tried changing my hosts file to use 127.0.0.1 based on another answer I saw on SO, but that didn't work for me. I use the command
vagrant reload --provision
each time I make any change to Homestead.yaml and my hosts file. I have noticed that firefox and chrome both redirect to https://obsessories.dev, but I'm not sure if that's a problem or not. I appreciate any help or insight on this in advance!
Here is my Homestead.yaml file:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: C:\Users\******\Projects\web\ssh\publickey.pub
keys:
- C:\Users\******\Projects\web\ssh\privatekey.ppk
folders:
- map: C:\Users\******\Projects\web\sites
to: /home/vagrant/code
sites:
- map: obsessories.dev
to: /home/vagrant/code/obsessories/public
databases:
- homestead
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# zray:
# If you've already freely registered Z-Ray, you can place the token here.
# - email: foo#bar.com
# token: foo
# Don't forget to ensure that you have 'zray: "true"' for your site.
output for pinging 192.168.10.10
ping 192.168.10.10
Pinging 192.168.10.10 with 32 bytes of data: Reply from 192.168.10.10:
bytes=32 time<1ms TTL=64 Reply from 192.168.10.10: bytes=32 time<1ms
TTL=64 Reply from 192.168.10.10: bytes=32 time<1ms TTL=64 Reply from
192.168.10.10: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.10.10:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
output for pinging obsessories.dev
ping obsessories.dev
Pinging obsessories.dev [192.168.10.10] with 32 bytes of data: Reply
from 192.168.10.10: bytes=32 time<1ms TTL=64 Reply from 192.168.10.10:
bytes=32 time<1ms TTL=64 Reply from 192.168.10.10: bytes=32 time<1ms
TTL=64 Reply from 192.168.10.10: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.10.10:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Joe's suggestion worked for me. I changed the domain to .local instead and reloaded vagrant and works just fine now.
This is my hosts file (c:\WINDOWS\system32\drivers\etc)
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
x.x.x.x my.hostname1
#x.x.x.x my.hostname2
x.x.x.x is my actual IP. I'm running a Tomcat 6.0 server on 127.0.0.1:80 with Windows XP (please don't blame me, not my machine). So, if I open localhost or x.x.x.x, i can see the error message of Tomcat (but that's ok, cause I've not put any project name in the URL).
If I open my.hostname1, a network error page is displayer. If I replace in my hosts file my.hostname1 with my-hostname1, the behavior is the same of localhost or x.x.x.x, so I think the problem is the dot (.) character in the host name. Is there a way to include a dot in my hostname?
Thank you
EDIT:
The ouput of running on cmd ping my.hostname1
Pinging my.hostname1[x.x.x.x] with 32 bytes of data:
Reply from x.x.x.x: bytes=32 time<1ms TTL=128
Reply from x.x.x.x: bytes=32 time<1ms TTL=128
Reply from x.x.x.x: bytes=32 time<1ms TTL=128
Reply from x.x.x.x: bytes=32 time<1ms TTL=128
Ping statistics for x.x.x.x:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
I find out it was a proxy problem, now I added an exception to my internet options, exaclty 'local*', and everything works.
Host names cant have "." inside them. Dots are used as separators for domain names.
You can use something like myhostname.domain , where domain is your domain, or just myhostname.
Read more at http://en.wikipedia.org/wiki/Fully_qualified_domain_name
I would like to start an application from a pre-build step. However, I do not want Visual Studio to wait for the application to close.
Basically, I have a simulation engine that I need to start prior to a debugging session.
Is this possible? I tried commands like "start app.exe" and "cmd start app.exe"...
Is "start /b" what you're looking for? It starts the command and returns immediately.
C:\>start /b ping stackoverflow.com
C:\>
Pinging stackoverflow.com [69.59.196.211] with 32 bytes of data:
Reply from 69.59.196.211: bytes=32 time=153ms TTL=44
C:\>Reply from 69.59.196.211: bytes=32 time=153ms TTL=44
C:\>Reply from 69.59.196.211: bytes=32 time=153ms TTL=44
C:\>
C:\>Reply from 69.59.196.211: bytes=32 time=154ms TTL=44
Ping statistics for 69.59.196.211:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 153ms, Maximum = 154ms, Average = 153ms
C:\>
This is how I ended up doing this.
It was kind of a "duh" moment, but I created a simple console application that starts a process and returns.
Thanks to Eugene for the suggestion.
I am setting up a development server in my flat. I have set up an Ubuntu DNS server on it and have added the zone weddinglist (just weddinglist - no TLD. It's just an internal domain.)
This works fine on my Ubuntu laptop.
On all my Windows PCs (Vista and XP) I get the following from the command prompt:
C:\Users\Giles Roadnight>nslookup weddinglist
Server: UnKnown
Address: 192.168.0.40
Name: weddinglist
Address: 192.168.0.41
C:\Users\Giles Roadnight>ping 192.168.0.41
Pinging 192.168.0.41 with 32 bytes of data:
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Reply from 192.168.0.41: bytes=32 time<1ms TTL=64
Ping statistics for 192.168.0.41:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Users\Giles Roadnight>ping weddinglist
Ping request could not find host weddinglist. Please check the name and try again.
My ipconfig:
C:\Users\Giles Roadnight>ipconfig -all
Windows IP Configuration
Host Name . . . . . . . . . . . . : Giles-Desktop
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Marvell Yukon 88E8001/8003/8010 PCI Gigabit Ethernet Controller
Physical Address. . . . . . . . . : **-**-**-**-**-**
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::f179:680f:f313:5448%8(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.0.5(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1
DNS Servers . . . . . . . . . . . : 192.168.0.40
NetBIOS over Tcpip. . . . . . . . : Enabled
I am pretty sure that I have the DNS set up OK as the nslookup is OK but I can't ping and I can't access webpages at weddinglist.
How can I make ping work for the Windows PCs?
It's possible that the Windows internal resolver is adding '.local' to the domain name because there's no dots in it. nslookup wouldn't do that.
To verify this possiblity, install 'Wireshark' (previously aka Ethereal) on your client machine and observe any DNS request packets leaving it when you run the ping command.
OK, further investigation on my own XP machine at home reveals that for single label names (i.e. "foo", or "foo.") the system doesn't use DNS at all, and instead uses NBNS (NetBios Name Service).
Using a hint found at http://www.chicagotech.net/netforums/viewtopic.php?t=1476, I found that I was able to force DNS lookups for single label domains by putting a single entry reading "." in the "Append these DNS
suffixes (in order)" in the "Advanced TCP/IP settings" dialog
I had this problem occasionally when using a multi-label name ie test.internal
The solution for me was to stop/start the dnscache on my windows 7 machine. Open a console as administrator and type
net stop dnscache
net start dnscache
then sigh and look for a way to get a Mac as your principal desktop.
I have the same issue with IIS running on my home server, on the client machine a command like ipconfig /flushdns usually solves the problem.
I had the same issue.
As pointed out by other answers ping and nslookup use different mechanisms to lookup an ip.
Chances are you are trying to ping a machine not on the same domain. When you ping the fully qualified name of the server this should then work.
nslookup works:
PS C:\Users\Administrator> nslookup nuget
Server: ad-01.docs.com
Address: 192.168.10.20
Name: nuget.docs.com
Address: 192.168.10.17
Ping fails:
PS C:\Users\Administrator> ping nuget
Ping request could not find host nuget. Please check the name and try again.
Ping works, using FQDN:
PS C:\Users\Administrator> ping nuget.docs.com
Pinging nuget.docs.com [192.168.70.17] with 32 bytes of data:
Reply from 192.168.10.17: bytes=32 time=1ms TTL=127
Reply from 192.168.10.17: bytes=32 time=2ms TTL=127
Reply from 192.168.10.17: bytes=32 time=2ms TTL=127
Reply from 192.168.10.17: bytes=32 time=2ms TTL=127
Ping statistics for 192.168.10.17:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1ms
To fix this you will need to alter the DNS setting for the machine and add the DNS suffix to lookup.
Control Panel\Network and Internet\Network Connections
Network adapter -> properties
IPV4 -> Properties
General tab -> Advanced
DNS Tab
Select "Append these DNS suffixes (in order)"
Add the required domain names
Disable, then enable your network adapter (don't do this on a VM, you'll loose your connection, instead try 'ipconfig /renew')
I think this behavior can be turned off, but Window's online help wasn't extremely clear:
If you disable NetBIOS over TCP/IP,
you cannot use broadcast-based NetBIOS
name resolution to resolve computer
names to IP addresses for computers on
the same network segment. If your
computers are on the same network
segment, and NetBIOS over TCP/IP is
disabled, you must install a DNS
server and either have the computers
register with DNS (or manually
configure DNS records) or configure
entries in the local Hosts file for
each computer.
In Windows XP, there is a checkbox:
Advanced TCP/IP Settings
[ ] Enable LMHOSTS lookup
There is also a book that covers this at length, "Networking Personal Computers with TCP/IP: Building TCP/IP Networks (old O'Reilly book)". Unfortunately, I cannot look it up because I disposed of my copy a while ago.
Do you have an entry for weddinglist in your hosts file? You can find this in:
C:\WINDOWS\system32\drivers\etc
nslookup always uses DNS whereas ping uses other methods for finding hostnames as well.
I found a little bug in windows Server 2003 R2 EE.
you know that when you specify your IP address in the NIC (network connections), windows tells you that if you dont specify the preferred DNS server, it will put his own ip because it is an DNS server? well it doesn't do that...
I fixed my problem writing the dns adress manually, instead of letting windows do it for me.
Try ipconfig /displaydns and look for weddinglist. If it's cached as "name does not exist" (possibly because of a previous intermittent failed lookup), you can flush the cache with ipconfig /flushdns.
nslookup doesn't use the cache, but rather queries the DNS server directly.
It worked for me..
from https://superuser.com/a/507892
If you can ping the FQDN, look at how DNS devolution is set up the PC.
Winsock API which MS ping will automatically use the FQDN of the client PC if append primary and connection specific DNS suffix is checked in TCP/IP advanced DNS settings. If the host is in another domain, the client must perform DNS devolution.
Under XP TCP/IP advanced properties DNS, make sure append parent suffixes is checked so that the ping request traverses the domain back to the parent.
I think the problem can be because of the NAT. Normally the DNS clients make requests via UDP. But when the DNS server is behind the NAT the UDP requests will not work.
I know it's not your specific problem, but I faced the same symptoms when I configured a static IP address in the network adapter settings and forgot to enter a "Default Gateway".
Leaving the field blank, the network icon shows an Internet connection, and I could ping internal servers but not external ones, so I assumed it was a DNS problem. NSLookup still worked, but of course, ping failed to find the server (again, seemed like a DNS issue.) Anyway, one more thing to check. =P
FYI - I have been struggling with this issue for the past 3 hours. tried everything, flushing DNS, using a proxy, resetting catalog using netsh and clearing the routes. nothing worked so i decided to give windows restore a try, I did it using a windows cd -> repair -> system restore and it worked ! couldnt find any solutions online so i figured id post it
I also encountered this issue. No Windows application (except Chrome) could access the internet. I found it was a duplicate IP on the LAN. I changed the local IP, and everything, including ping, started working again.
I found the problem doing an
IPCONFIG /ALL
and it listed
IPv4 Address. . . . . . . . . . . : 10.10.0.20(Duplicate)
I also had this problem on a Server 2012 R2 VM joined to my local AD domain. I eventually solved the problem by taking the VM off the domain and re-joining it.