-2

I know that default gateway should be my router, and when I check it's address with ipconfig command on windows host pc, it shows that default gateway is 192.168.1.1. But when I check on Linux(virtual machine) it gives me completely different address as default gateway 192.168.72.2.

I also want to scan my network with nmap to see all connected devices. When i use nmap 192.168.72.0-255 (to scan my whole network) it outputs like there is only 2 devices connected(192.168.72.2-default gateway and 192.168.72.132-my linux pc), even though i know there is a few more devices.

Does virtual machine make its isolated network and is there a way to reach my original default gateway 192.168.1.1 in order to scan my real network and find out all devices connected.

Bane2000
  • 187
  • 1
  • 9
  • virtual machine make its isolated network.. maybe. did you try scanning 192.168.1.1-255 range? If its isolated its comparable to scanning your ISP's internal network i.e almost every network has a 192.168 range it doesn't mean your on it – Lawrence Cherone Jul 18 '20 at 16:26
  • Yes, i know that 192.168.1.1 is my internal address, but when i'm on linux it gives me different internal ip and it seems i can't even reach my real internal network. I'm not sure but i assume that scanning 192.168.1.1 when I'm on linux will actually scan someone's external IP, which is illegal. – Bane2000 Jul 19 '20 at 07:56

1 Answers1

0

Your virtual machine is in NAT mode by default (so not the same network). To use it directly on your LAN you need to change the networks settings (in the hypervisor not in the VM) and select “bridge” mode

gus
  • 16
  • 2