Jump to content

Networking issues in kali


Cai-Birdy
 Share

Recommended Posts

I am really really brand new in Linux. I recently set up a lab for pen testing, but stuck by a few networking issues. Host window10, guest Kali linux, eth0 and eth1(both are in same subnet, also same as host-only adapter ), use both host-only and bridged modes. there are several questions for help:

1. firstly I enabled host-only network mode in virtualbox for Kali. By using eth0, I can ping host-only adapter on host successfully, but cannot ping host ethernet adapter. I think that is how host-only mode works. then I  enabled Bridged mode, I thought there should be a new ethernet interface showing up on host, however, it didn't(until now only two interfaces on adapter settings, one is host ethernet interface, the other is host-only) . my question is whether it is normal... 

2. continued the above scenario...I assumed that is normal:rolleyes:...then in bridge mode of virtualbox setting, I selected host ethernet adapter name from dropdown list as the one for bridge. Also configure eth0, eht1, host-only adapter and host ethernet adapter into the same subnet. When I bring eth1 down and bring eth0 up, from host terminal, I cannot ping ip for eth0, but from Kali terminal I can ping host machine and 8.8.8.8, cannot ping host-only adapter, cannot open up google.com in browser(it really confused me...); if I bring eth0 down and bring eth1 down, can only ping host-only adapter. so it appears that eth0 only works for Bridge and eth1 only works for host-only, is that right ?

3. I noticed some posts mentioning that there should be a bridged connection between host-only adapter and one local area connection(also an adapter, in my scenario, host ethernet adapter is supposed to take this role), but I don't think it is true. can you guys advise ?

4, sorry, my question or description of the question are a little mess...words in bold are questions. before entering the real pen testing, I already got so much confusion, thanks a loooooot !

Link to comment
Share on other sites

In bridged mode, you're virtual adapter for the VM gets an IP on the network like a real machine would. It shares the main hosts adapter for real connectivity at all times in any mode, but in bridged, it can be treated like it's another machine on the network.

host-only adapter, is so that the VM can only talk between the host machine(windows) and the guest machine(VM), and is isolated -  not supposed to be able to see the rest of the network, even if on same subnet. In theory you could setup routes to reach elsewhere, but pretty sure the host-only setup will block this until you add in a bridged adapter and add routes. If you want it in both host-only and on the regular network, you use 2 NIC interfaces, with a bridged interface able to see everything, and the host-only, only sees the host. If a tool you use fails to work, some let you assign an interface to it, so if you want to test something outside the host-only network, you need to tell the tool to use the bridged adapter. For example, netdiscover tool can be assigned to an interface before running, by default I believe it takes eth0 or the first adapter, but to find machines on the network, you'd need to assign it to the bridged adapter.

If you set any to NAT, it's as if it's behind a router, which means port forwarding issues and reaching it from other machines becomes a problem, similar to host-only connections, but you can use NAT on multiple VM's in VBOX to create a new network subnet where the HOST machine acts as the router/gateway and then the other VM's only see each other and the HOST. Adding in then a bridged adapter on one of those machines, lets you then pivot between the different networks/subnets.

 

Might be a good idea to read up on networking in general, routes, subnets, network masks, etc. Will make more sense when you have a better understanding of network fundamentals.

 

Edited by digip
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...