118 reputation
4
bio website
location Madrid, Spain
age 51
visits member for 2 years, 3 months
seen Apr 5 at 19:05

Oct
21
awarded  Scholar
Oct
21
accepted How to identify the local network you are connected to
Oct
21
comment How to identify the local network you are connected to
AT work there are lots of security settings: a firewall and a proxy that make almost impossible to do anything. for example 'dig +short www.google.com' is blocked and doesn't answer anything, in addition all the dynamic hosts are filtered out so I can't use ping or something similar. I have finally managed it using networks-tools.com as in curl -q http://network-tools.com/default.asp?host=myhostname | grep -oE '<br/>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | cut -c6- but surely there has to be a simpler and more reliable way to do it!!
Oct
21
comment How to identify the local network you are connected to
Thanks, this works, though it is a little involved as my home public IP is not static. To know the current IP I am using NO-IP, and I'm having problems resolving the hostname to an IP when at work.
Oct
18
comment How to identify the local network you are connected to
Thanks for your answer, it seems that neither the ip nor the iwconfigare avaliable for cygwin. I've found however that the command: netsh wlan show interfaces | grep [^B]SSID gives me the SSID of the wlan (not the ESSID though). I can also check if I'm wired or not parsing the output of netsh interface show interface | Conectado. What I can't figure out is how to know if I'm wired at home or at work.
Oct
18
comment How to identify the local network you are connected to
Thanks. I've tried that but it gives the host name repeated twice. I should say that I'm running cygwin under Windows7.
Oct
18
asked How to identify the local network you are connected to
Jul
17
comment Script or tool to get the IP address of a remote host
You are right, thanks. I've edited it out.
Jul
17
awarded  Editor
Jul
17
revised Script or tool to get the IP address of a remote host
deleted 96 characters in body
Jul
17
awarded  Supporter
Jul
17
comment Script or tool to get the IP address of a remote host
Thanks for your answer, I've tryed all the three but they doen't seem to work (in my context). For example host returns the message host www.example.com not found: 3(NXDOMAIN). I have also created the file etc/resolv.conf both with the ip of dns server obtained with the command ipconfig /all and with the ip of googles's public dns 8.8.8.8 without success. I fear the problem comes from some kind of limitation placed by my network's security.
Jul
17
awarded  Student
Jul
17
asked Script or tool to get the IP address of a remote host