How can I check if I'm connected to my own wireless network on windows or linux?

6

3

Recently I had to reset my router and was unable to log into my network.

There were some networks around me when I was out of my network and had to reset my router to defaults, even though it's highly impossible that I had connected to others' networks (with coincidentally the same password and the same SSID, and possibly changed the homepage's settings because they matched). How can I absolutely confirm that I'm connected to my own network?

I've tried the non-technical way with confirming by switching the router on/off, but, is there a more precise way of confirming that I am connected to my own network?

mathmaniage

Posted 2017-04-03T12:43:35.817

Reputation: 233

Your homepage is configured on your client. If there are multiple SSIDs with the same name, and they are not protected, then there is no good way to differante them. If you had "reset" your router that means your wireless network wasn't protected with a password. – Ramhound – 2017-04-03T13:00:56.940

In what sense do you require a more precise way? – a CVn – 2017-04-03T13:02:42.590

Why is switching the router on/off non-technical? Because it's not fancy enough? – Kamil Maciorowski – 2017-04-03T13:02:51.983

If you only switched the router on/off it means all the settings is still the same – yass – 2017-04-03T13:15:30.550

@KamilMaciorowski: Because it causes unnecessary disruption (i.e. losing wireless and often wired connection) for what is a trivial status check. Not everyone lives alone. – user1686 – 2017-04-03T13:17:49.910

@grawity Unlike a factory reset...? – a CVn – 2017-04-03T13:30:57.543

@Ramhound, Router came with a 'reset to default' button, and I pressed it. Before that, I ensured my network was password protected, with SSID broadcast disable, and mac filtering enabled. and after I hit that button, everything was reset.(if it is my own network, that, I'm unsure of) – mathmaniage – 2017-04-03T14:51:30.180

@KamilMaciorowski, I was thinking of something unique to my router kind of identification – mathmaniage – 2017-04-03T14:52:49.050

Please edit the question so that "wifi" or "wireless" is in the title. Please include the OS(es) you use in the question. – Christopher Hostage – 2017-04-03T16:02:09.567

Are you trying to protect against something like an old access point that you might have configured with the same key and left plugged in? Or an innocent happenstance where someone chose the same SSID and key as you? Or are you trying to defend against a possibly hostile adversary? They're completely different problems. – David Schwartz – 2017-04-03T21:54:36.713

@DavidSchwartz , the second one, though I mentioned it in the question – mathmaniage – 2017-04-04T05:02:55.743

@ChristopherHostage , yes but there are answers for linux as well......... – mathmaniage – 2017-04-04T05:03:18.700

Answers

8

Check the BSSID, that is, the access point's MAC address.

At home you'll usually have only one access point that's built into your router, so compare the MAC with the one written on the sticker on its bottom. (It might differ by a single digit in some cases.)

You didn't mention the OS you use, so I'll assume Linux:

$ iw wlan0 link
Connected to 24:a4:3c:ce:d2:16 (on wlan0)
    SSID: eduroam
    freq: 2462
    ...

Or you could check whether a scan detects multiple APs with the same name:

$ sudo iw wlan0 scan | egrep "^BSS|SSID"

$ nmcli -f in-use,ssid,chan,bars,security,bssid dev wifi list

There are various "Wi-Fi scanner" apps for Windows and macOS as well – can't recommend any, but most of them are able to display a basic "network list" including channels, BSSIDs, and all that. There's one from Nirsoft, and probably heaps of other freeware.

If you're on Windows (7 or later), the same can be done via netsh:

C:\> netsh wlan show interface
There is 1 interface on the system:
    ...
    SSID                   : eduroam
    BSSID                  : 24:a4:3c:ce:d2:16
    Network type           : Infrastructure
    Radio type             : 802.11n
    ...

(I can't remember offhand what's the command to request a scan, but it's also under netsh wlan show <something>.)

On macOS, this post suggests:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I en1
              ...
      link auth: wpa2-psk
          BSSID: 24:a4:3c:ce:d2:16
           SSID: eduroam
            MCS: -1        channel: 6

On FreeBSD, all that should be under ifconfig.

Android has quite a few "Wi-Fi analyzer" apps; at the time of posting, this one worked well.


The homepage, however, is not a network setting. Only your web browser cares about that.

user1686

Posted 2017-04-03T12:43:35.817

Reputation: 283 655

Note that there are devices like the pineapple that will pretend they're your router and do all kinds of nefarious things. I don't know if they'll spoof the MAC of the router, too, though.

– Wayne Werner – 2017-04-03T17:35:48.827

1This won't work. If an attacker knows his SSID and key, which he's assuming, they'd certainly know his SSID as well. This is no protection against a hostile adversary. – David Schwartz – 2017-04-03T21:53:41.867

2

If you have a Linux machine (I assume you can do this on Windows too), you can run arp <gateway address> to get the MAC address of the router (labelled HWAddress). Compare this to the MAC address that is printed on the sticker on the router (or at least, should be). E.g.

[root@server~]# arp 192.168.1.1
Address                  HWtype  HWaddress           Flags Mask            Iface
gateway.domain.com ether   XX:XX:XX:XX:XX:XX   C                     eth0

[EDIT]the Windows syntax is:

arp -a <ip address>

Darren

Posted 2017-04-03T12:43:35.817

Reputation: 2 435

1

I guess we're talking about quite standard home setup with NAT, LAN subnet, private IPs etc.

  1. Connect another computer to your router via cable.
  2. Initiate any transfer/connectivity between the two computers using their LAN addresses and check if it succeeds and matches at both ends. Examples:
    • Samba/NFS sharing,
    • ssh from one to the other,
    • simple connection with nc -l and nc,
    • ping (or virtually anything) from one end and wireshark analysis on the other.

You may have to configure the firewall (if any) on the receiving side to allow access. The main point is: if your first computer is in another LAN (i.e. connected to another router) then all such tests will fail.

Kamil Maciorowski

Posted 2017-04-03T12:43:35.817

Reputation: 38 429

1

In Windows PowerShell:

netsh wlan show interfaces | Select-String 'SSID'

In the Windows Command Prompt:

netsh wlan show interfaces | find "SSID"

Bob Nightingale

Posted 2017-04-03T12:43:35.817

Reputation: 46