You are not logged in.

#1 2012-12-27 10:37:08

Freeman
Member
Registered: 2012-12-19
Posts: 4

Route Arch host traffic through VirtualBox guest

I am giving out free wifi to the neighborhood. I am attempting to use pfsense as the firewall. I have pfsene installed as a virtualbox guest.
This is what I am trying to do.

AP(eth1) > Arch Host > Pfsense VM guest > internet (eth0)

I would like all traffic (including host's) to be routed through the pfsense guest.

Step on is to have the host be able to conenct to the gues VM and I am failing there. I have the Guest networking set to bridge with eth0, but it only works in NAT. Could I get some hints? I have put in many hours into this and my lack of familiarity with both linux and networking has been strained.

Thanks a bajillion for any and all help,
Freeman big_smile


Liberty

Offline

#2 2012-12-28 10:24:45

scjet
Member
From: Canada
Registered: 2010-12-01
Posts: 1,468

Re: Route Arch host traffic through VirtualBox guest

if I just go by your "I am giving out free wifi to the neighborhood....", then why not something simple, (with MAC Address Filtering per client). like this, for bascially free:
http://lewifi.blogspot.ca/2012/10/share … tting.html

I admit, this may not help you, and I'm not knowledgeable in regards to setting up "pfSense", but it sounds like a pfsense issue, not an Arch issue:
http://www.interspective.net/2012/07/on … -rule.html

hopefully, some of this might help.

Last edited by scjet (2012-12-28 12:24:18)

Offline

#3 2012-12-28 22:31:08

mike4ca
Happy (Arch|Manjaro)[B,b]ang User
From: Iowa, USA
Registered: 2011-10-17
Posts: 435

Re: Route Arch host traffic through VirtualBox guest

I once read an article in BSD Magazine about what you are attempting.  The article talked about using a laptop on a public access point (i.e., hotel, coffee shop, etc).  Their example ran OpenBSD in a VMware appliance on a Windows host.  They had it setup so the OpenBSD VM used the wireless card to pick up the wifi and then apply the firewall and NAT to a fictitious(?) network connection that the Windows host would connect to.  This essentially put a firewall between the Windows computer and the wifi.

I attempted to replicate myself once before, but did not have any luck.  But I blame that mostly on lack of knowledge on my part.  I got stuck at the same place I think you did.  I will download pfsense and work on it again.  Maybe we can work together.  Or as people read our posts the will see where we are going wrong.

For those that are reading.  Where I think we really need help is with VirtualBox networking.  If you are experienced in more advanced VB network configuration.  Please let me know.


Free Software Foundation member 10865

Offline

#4 2012-12-28 23:20:20

mike4ca
Happy (Arch|Manjaro)[B,b]ang User
From: Iowa, USA
Registered: 2011-10-17
Posts: 435

Re: Route Arch host traffic through VirtualBox guest

OK, I started reading through the VirtualBox manual and now remember more clearly where I got confused.  It was with the different types of networking.  There are:

  1. NAT(clearly not what I want).

  2. Bridged networking.

  3. Internal networking.

  4. Host-only networking.

I am not sure which I need to use or if it is a combination.  I need pfsense to use one network interface to talk with the wireless card directly.  I think this is Bridged networking.  And then route to another network interface that my host talks to.  This sounds like Host-only networking.  Is this what you are trying?


Free Software Foundation member 10865

Offline

#5 2012-12-29 13:30:15

scjet
Member
From: Canada
Registered: 2010-12-01
Posts: 1,468

Re: Route Arch host traffic through VirtualBox guest

Thanks mike4ca for the helping hand here.
But yes, the OP needs to bring out "more schematically" network-wise, what he is exactly trying to setup/wire-up here. ?
VirtualBox (and it's configs'), as you rightfully mentioned, must also be considered in this dilemma.
- just my 2 cents.

Last edited by scjet (2012-12-29 13:36:10)

Offline

#6 2012-12-29 21:07:12

mike4ca
Happy (Arch|Manjaro)[B,b]ang User
From: Iowa, USA
Registered: 2011-10-17
Posts: 435

Re: Route Arch host traffic through VirtualBox guest

What I tried today (without success) was setting up the pdSense guest with Adapter 1 as a bridged connection to the wlan0 (I am currently connected to my network over my wifi) and Adapter 2 as Host-only Adapter.  VirtualBox has the Host-only as vboxnet0.  When starting pfSense, I set the WAN to Adapter 1 (was listed as em0) and the LAN to Adapter 2 (em1).  pfSense got an appropriate and unique IP address for on my home network for the WAN connection and assigned 192.168.1.1 to the LAN connection.  I can ping google.com from pfSense.

I wanted to have my host connect to the Host-only.  I ran

list: ip addr | sed '/^[0-9]/!d;s/: <.*$//'
1: lo
2: eth0
3: wlan0
4: vboxnet0
sudo ip link set vboxnet0 up
ip addr show dev vboxnet0
4: vboxnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000

just gives the unkown state for vboxnet0 and I can't ping the 192.168.1.1 address. If I set wlan0 to down, I lose the pfSense WAN connection.

I tried changing the Adapter 2 to Bridged Adapter as well.  I can't get the host to connect to the guest with through eth0 either.  In this case the eth0 state stays at down.

Any ideas?


Free Software Foundation member 10865

Offline

Board footer

Powered by FluxBB