How to find Wifi routers in network - elasticsearch

Good day
Do you have any idea how to find WIFI routers or devices which is connected to specific LAN sockets in network?
I am try find this devices from logs Elasticsearch + Kibana namely
https://www.elastic.co/guide/en/beats/packetbeat/current/configuration-interfaces.html
With this solution I have problem with set up : packetsbeats.
Other solution which I found is : WireShark or Advanced IP Scanner or Angry IP.
With this solution /tools is problem with default setting of routers / devices which is lock ports. Its mean I can get all IPs or MACs in network but how I will get know which is IPs or MACs belonging to Routers / NTB / Mobiles ect..?
From this reason I decide find routers in network from logs by Kibana.
Do have any idea or did you make something like me?
Thanks

Wi-Fi (IEEE 802.11) is a layer-1/2 protocol, but routing is a layer-3 function, so there really is no such thing as a Wi-Fi router. There are some routers that have Wi-Fi interfaces, but they are routing a layer-3 protocol, e.g. IPv4, not Wi-Fi. Ports are layer-4 addresses for some layer-4 protocols, e.g. UDP, and they have nothing to do with routing layer-3 packets.
A router is simply a host on a layer-2 LAN. The configured gateway for your host is usually a router. The gateway is the host on a LAN to which your host sends packets destined to a different network.
Determining which hosts on a LAN are routers is a problem because you have no way to know which hosts are actually routers. You can have multiple routers on a LAN, but your host will be configured with one as its default gateway.
If you want to determine which host is the gateway for your host, then you should look at the configuration of your host, not at any particular host on the LAN.

Related

Capturing Network Router Traffic with Wireshark

i want to see whole router traffic network.
How i can do this with wireshark? :)
I can see my Wireless network card:
List of Adapters
but i want see my Router network traffic.
Please help :)
Depending on your router model (I assume you have a standard home ISP router), you should be able to mirror your Router's traffic into a particular LAN port on the device. This will act as a sort of "LAN-TAP", and will mirror all traffic flowing through the Router to that port.
Here is an article explaining it.
However, you should ask yourself whether or not this is particularly necessary.
Most home routers are realisticaly, just a switch that acts as a PAT Router for your ISP. You can't do any funky routing on your own LAN with them, so this router is just sitting back and forwarding packets that are travelling over the LAN. This means that due to your home router broadcasting packets from devices on the network, the packets are naturally going to be hitting your network adapter too, which will be visible on Wireshark.
However, if you are wanting to be viewing packets that are being routed by your Router to Outside the network, go ahead and enable port mirroring.

Windows 10: introduced router and can't see other computers in network

When I'm connected via cable to the building's network socket I can see all other computers in the network.
Now I introduced a router and can only see computers in the router's sub-network. Is there something I can do to be able to see other computers in the network to which now router is directly connected?
I disabled firewall on the router.
Cheers
Router is a Layer 3 device for routing network traffic between networks. But not broadcast by default. So you can see only PCs in your subnet. Because broadcast is allowed. So you have to find a solution how to allow the broadcast traffic in your router. If it not possible you can't get what you want by simple solution.

Force gateway for IP connection

I have two NICs in my Windows PC, one for Internet and the other for outbound UDP streams. Both NICs have gateways and I tweak the metrics so that Internet bound traffic goes to the first. I would rather disable the gateway on the second NIC and specify the gateway when I create the UDP socket. Is this possible? Can I force the destination MAC address on a socket?
You have to bind() the socket to the local IP address of the NIC you want to use. If you don't know the IP, use GetAdaptersInfo() or GetAdaptersAddresses() to enumerate the NICs until you find the one you want, and then you will know its current IP to bind to.

Cisco SG200-50 Switch Traffic Showing up on Firewall's Sessions

I am using a Juniper firewall device that our incoming internet connection receives, then a switch that connects a bunch of servers that is connected to the firewall.
For some reason, some of the traffic between the hosts connected to the switch are showing up as sessions on the Juniper firewall. The hosts are using the same network address. I thought the traffic should be strictly going through the switch to other host, not out to the firewall and then back to the switch then the host.
I created a test environment, with a small switch, and the traffic between the hosts did not show up on the firewall sessions.
Is there anything particular to the Cisco SG200-50 that would cause traffic bound from one port to another, same network address, to be sent out to the firewall before switching the traffic to the other port?
The switch will not be looking at the layer-3 packet, it only delivers known unicasts to the port where the destination MAC address is located. It will flood unknown unicasts and broadcasts to all switch ports, including the router. To the switch, the router is just another host.
I have seen this when one or more hosts have either an incorrect mask or an incorrect gateway configured.

Find IP address of directly connected device

Is there a way to find out the IP address of a device that is directly connected to a specific ethernet interface? I.e. given one host, one wired ethernet connection and one second host connected to this wired connection, which layer or protocol below IP could be used to find this out.
I would also be comfortable with a Windows-only solution using some Windows-API function or callback.
(I know that the real way to do this would probably via DHCP, but this is about discovering a legacy device.)
Mmh ... there are many ways.
I answer another network discovery question, and I write a little getting started.
Some tcpip stacks reply to icmp broadcasts.
So you can try a PING to your network broadcast address.
For example, you have ip 192.168.1.1 and subnet 255.255.255.0
ping 192.168.1.255
stop the ping after 5 seconds
watch the devices replies : arp -a
Note : on step 3. you get the lists of the MAC-to-IP cached entries, so there are also the hosts in your subnet you exchange data to in the last minutes, even if they don't reply to icmp_get.
Note (2) : now I am on linux. I am not sure, but it can be windows doesn't reply to icm_get via broadcast.
Is it the only one device attached to your pc ?
Is it a router or another simple pc ?
To use DHCP, you'd have to run a DHCP server on the primary and a client on the secondary; the primary could then query the server to find out what address it handed out. Probably overkill.
I can't help you with Windows directly. On Unix, the "arp" command will tell you what IP addresses are known to be attached to the local ethernet segment. Windows will have this same information (since it's a core part of the IP/Ethernet interface) but I don't know how you get at it.
Of course, the networking stack will only know about the other host if it has previously seen traffic from it. You may have to first send a broadcast packet on the interface to elicit some sort of response and thus populate the local ARP table.
Windows 7 has the arp command within it.
arp -a should show you the static and dynamic type interfaces connected to your system.
Your Best Approach is to install Wireshark, reboot the device wait for the TCP/UDP stream , broadcasts will announce the IP address for both Ethernet ports
This is especially useful when the device connected does not have DHCP Client enabled, then you can go from there.
You can also get information from directly connected networking devices, such as network switches with LDWin, a portable and free Windows program published on github:
http://www.sysadmit.com/2016/11/windows-como-saber-la-ip-del-switch-al-que-estoy-conectado.html
LDWin supports the following methods of link discovery: CDP (Cisco Discovery Protocol) and LLDP (Link Layer Discovery Protocol).
You can obtain the model, management IP, VLAN identifier, Port identifier, firmware version, etc.

Resources