You are not logged in.

#1 2013-04-19 18:19:32

sabreman
Member
Registered: 2012-11-09
Posts: 17

Connecting to a secure network form inside a VM.

So my school has a secure wifi network, requiring both a username and password to connect and I can not for the life of me figure out (or find) a way to connect to it. I know my networking is set up properly since I can connect to ANY other network just fine including normal password protected wifi networks. Is there a package that will help me do this, or am I screwed?

Offline

#2 2013-04-19 18:41:31

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: Connecting to a secure network form inside a VM.

One of us is highly confused. 

When you are inside of a VM, you do not directly use the network hardware of your host computer.  You have a virtual interface in the VM that talks over a virtual network to the program that is providing your virtual environment (VirtualBox, WMware, etc....).  That virtualization software then provides connection to a real network using either NAT or a Bridge.

I can connect to ANY other network just fine including normal password protected wifi networks.

.  That ^^ is why I am confused.  There should not be any wireless interface inside the VM.


What you should do is ensure the network mode of the VM is set to NAT. 
In the VM, connect to the virtual network as a wired network with a dynamic address (DHCP).
On the host, do whatever you need to do to establish a network connection.
Once the host network to the real world works, and the guest OS has a connection to the virtual network, the Virtualization software will forward the requests.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2013-04-19 18:48:45

chris_l
Member
Registered: 2010-12-01
Posts: 390

Re: Connecting to a secure network form inside a VM.

@ewaller: But what if he gave the virtual machine direct access to the usb port where a wifi dongle is connected?


"open source is about choice"
No.
Open source is about opening the source code complying with this conditions, period. The ability to choose among several packages is just a nice side effect.

Offline

#4 2013-04-19 18:51:26

sabreman
Member
Registered: 2012-11-09
Posts: 17

Re: Connecting to a secure network form inside a VM.

I should rephrase: My host (laptop) can connect to the school network, and any other network. My VM cannot, and yes I am using DHCP. I've tried both NAT and bridged mode, neither work. And It's a built in wifi card if that makes any difference.

Edit: The VM Can't connect to the school network, but all other networks I've tried work fine.

Last edited by sabreman (2013-04-19 18:55:26)

Offline

#5 2013-04-19 20:33:06

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: Connecting to a secure network form inside a VM.

chris_l wrote:

@ewaller: But what if he gave the virtual machine direct access to the usb port where a wifi dongle is connected?

Well, yes.  But there you do have access to the actual hardware.  I think this more the exception than the rule.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2013-04-19 20:42:21

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: Connecting to a secure network form inside a VM.

sabreman wrote:

I should rephrase: My host (laptop) can connect to the school network, and any other network. My VM cannot, and yes I am using DHCP. I've tried both NAT and bridged mode, neither work. And It's a built in wifi card if that makes any difference.

Edit: The VM Can't connect to the school network, but all other networks I've tried work fine.

Okay, that makes sense.  Here is a thought.  Perhaps the subnet that is in use by the virtual machine is the same that is used by the school's network; that would cause issues with NAT.  Although this would not explain the problem with a bridge. 

On the guest OS, what are the output of:
ip link
ip addr
and
ip route

On the host (assuming Windows host) what is the output of:
ipconfig
when run from a command shell and connected to the school network?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2013-04-19 22:20:06

sabreman
Member
Registered: 2012-11-09
Posts: 17

Re: Connecting to a secure network form inside a VM.

Offline

#8 2013-04-19 22:37:18

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: Connecting to a secure network form inside a VM.

I see two problems.  It appears that you've your VM network configured for Host-Only.  That is meant to allow the VM to see services provided by the host, but not beyond.  Stop your VM and change the network configuration of the virtual machine to NAT, and restart the VM.  Second, there is no IPv4 address for the guest on enp0s3.  Make sure you are running a dhcpcd daemon and that it is servicing that interface.  I saw the route output indicated that you may have an address of 192.168.1.6 -- perhaps you generated the output before dhcpcd had acquired an address.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2013-04-20 04:18:53

sabreman
Member
Registered: 2012-11-09
Posts: 17

Re: Connecting to a secure network form inside a VM.

Thanks, I'm not at school anymore so this will have to wait until next week to get tested. Also, like I said I have tried running it in NAT mode, and I know for a fact that I have a DHCPCD service starting at boot. HOWEVER, systemctl status says that everytime it starts, it cant find an 1pv4 router, tries looking for an ipv6 one, and then dies. If i start it manually, it does the same thing except it goes int "background" mode or something for a tad before dying.

Offline

#10 2013-04-20 07:40:37

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Connecting to a secure network form inside a VM.

Basically if your host has internet access, so will your guest. You need to set up the host to use whatever network your school offers, then the VM will piggyback on those settings (in NAT mode - the default setting for a newly created VM).


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

Board footer

Powered by FluxBB