[SGVLUG] VirtualBox networking question

Dan Buthusiem dan.buthusiem at gmail.com
Fri May 25 14:11:47 PDT 2012


I'll bite. Sorry it's so long, but I hope it answers your question:

Not sure if you'll need another NIC or guest OS to play the role of
Client, since you said you want it completely separated from your
host's network / the world.

What I'd do is, assuming you have a second network card:

Host PC:
NIC 1: leave it as you have it for your internet needs
NIC 2: No IP on this interface. If you can't get the following guests
to talk to each other through this NIC, you might need to crimp an
RJ45 connector to work as an ethernet loopback. I have some if you
need them (they make great toys to play with Network Admins).

Guest Web Server:
Configure the network for bridging to the host's NIC 2. Assign a
static IP. For sanity, make it a completely separate range from your
host's network. ex: if your host is 192.168.1.0, make your sandbox
10.1.1.0.

Guest Client:
Configure the network for bridging to the host's NIC 2. Assign a
static IP in the same range as the Web Server. Using the above
example, the server could be 10.1.1.1 IP / 255.255.255.252 mask, and
the client would be 10.1.1.2 IP / 255.255.255.252 mask / 10.1.1.1
gateway.

I'm not sure if connecting a cable from NIC2 into an empty switch
would get the connection up. To make an RJ45 ethernet loopback:

You'll need an RJ45 connector, an RJ45 crimper, and about 6 inches of
Cat5 cable (less if you're skilled / masochist)

1) Strip off the outside jacket of the Cat5 cable, leaving just the
wires. You'll need one of the pairs of wires (2 wires total). Save the
rest in case the first attempt fails, or you become inspired.

2) Clip the ends of the pair of wires to make sure they're neat and
square at the tips. They'll need to be flat when you put it into the
connector.

3) Take the RJ45 connector. With the clip facing the floor and the
opening facing you, connect the white or striped wire from pin 1 on
the left most slot to pin 3. With the colored wire, connect pin 2 to
pin 6. Make sure you have the wires fully inserted. You should see the
shiny metal conductors if you look at the front of the connector.

4) Put the RJ45 connector into the crimper and squeeze it hard. I
usually give it 3 squeeses using both hands, but that's because my 7
year old crimper cost me $5, and I refuse to get a fancy reliable one.

5) Test the ethernet loopback by connecting it into a network port,
preferably your computer's NIC. You should see the lights light up and
flash as if you connected a real cable. If you connect it to a switch
with spanning-tree enabled, the lights will flash for about 30 seconds
before the port shuts down, along with the lights and your fun.
Switches without spanning-tree enabled, and cheap "Fry's Special"
switches should flash furiously within 10 seconds, disabling all
network communications for the connected VLANs, so please be careful
where you test it. Rule of thumb is:  only try this at home. If you do
take out the network, remove the loopback. If the network doesn't
recover within a few minutes, you may need to reboot all of the
devices connected with that VLAN.


Hope this helps.
- Dan


On Fri, May 25, 2012 at 10:57 AM, 4V4-WRG <e320r837i4031j316 at yahoo.com> wrote:
> I like and use Vbox a lot but use it for only a limited amount of web
> activity.
>
> If you download the link below and run the ISO in Vbox then you can have Tor
> with an IP that changes every 10 minutes.
>
> ftp://ftp.nluug.nl/pub/os/Linux/distr/oniondsl/oniondsl-0.1.1.iso
>
> This is called Damn Small Linux, with Tor added. The original DSL is just
> under 50 MB.
> This ISO is around ~90MB
>
> To check it go to the 1st link below. To see the browser ID go to the 2nd
> link.
>
> http://whatismyipaddress.com/
>
> http://id.furud.net/identify.php/
>
> It's an anonymous web surfing but I only use it for limited stuff. Never for
> logging into email and bank accts.
> Web searches and stuff like that. The ID shows it as FF 2.0 and Windows XP
>
> Rob Wilcox
>
>
>
>
> ________________________________
> From: "nopbin at gmail.com" <nopbin at gmail.com>
> To: SGVLUG Discussion List. <sgvlug at sgvlug.net>
> Sent: Friday, May 25, 2012 11:12 AM
> Subject: Re: [SGVLUG] VirtualBox networking question
>
> With constraints as described, Virtualbox is not going to get you an ip
> address outside your firewall.  Best bet is to use an aws node or something
> like that if you don't have wired or wireless access to an external network.
> On May 24, 2012 7:57 PM, "Claude Felizardo" <cafelizardo at gmail.com> wrote:
>
> I believe there are a couple of people on this mailing list who are using
> VirtualBox or equiv...
>
> Has anyone setup a VirtualBox guest machine so it can access the internet
> but can not access the host's local network?  Basically create a network
> sandbox.
>
> For example, let's say I want to verify that an internal web server can NOT
> be accessed from the internet yet I want to be able to access it from my
> desktop and I don't have access to a machine outside my network to test
> from.  So using VirtualBox, I created a virtual machine running Ubuntu.
>  When I bring up a browser, I'm able to access a web server as if I was
> connecting directly from my desktop.  I want to configure this virtual
> machine so it has an IP address outside my local network.
>
> Any suggestions?  Tried googling but either it can't do it or I'm just not
> using the right keywords.
>
> Claude
>
>
>
>


More information about the SGVLUG mailing list