machines & Vmachines bridge

Posted on Friday, August 22, 2008. Filed under: GNU - Linux |


hello

have you ever faced the problem of using a virtual machine and you can’t connect to your real machine,i don’t mean connect to the internet, i mean you can’t “ping”, “ssh” or connect in any other way of those!

there’s a script attached in this post that is used for making bridge connection between your machine and your virtual machine(s)

first of all … you must install “bridge-utils” package to run the script without errors

if you’re using ubuntu, you may need to install “uml-utilities” package also

after that you can run the script 🙂

the script:

you can download the script from here

DOWNLOAD THE SCRIPT

running the script:

after extracting the .tar.gz file…

you can simply run the script by logging in as root, then “cd” to the containing directory

then use:

./script\ br.sh

to run the script

when running the script:

1) you’ll be asked for the username you’re logged in with (that doesn’t mean the “root” user, it means the user you’re logged in with in the X window)

2) you’ll be asked for the number of interfaces you want to create

so if you have 1 virtual machine type “1”, if you have “n” number Vmachines type “n”

3) then type your machine’s interface name, for example “eth0” or “wlan0” or whatever it is

4) you’ll be asked to enter your IP, for example “192.168.0.5”

5) then enter your Subnet Mask, for example “24”

(take a look in the table in “wikipedia”‘s link to know your subnet mask)

6) enter your network Gateway, for example “192.168.0.1”

now you’re finished installing the Interfaces and you should get your internet working in your machine also

but we still have a little work to do

open “VirtualBox” but don’t run the machines

go to the first machine settings —> network —> attached to: Host Interface —> Interface Name: tap1

(take a look into this image)

so if you have “#” number of machines, go to the machine network settings and use host interface and use the name tap#

after that you can run the machines without facing errors and you can connect to them using “ping”, “ssh” or whatever you want

i’ve tried to make my own DNS,FTP,HTTP,NFS servers using my Vmachines and i succeeded

😀

special thanks to “DidoooFidooo”, he helped me connecting to the internet when i faced this problem

good luck 🙂

bye!

Advertisements

Make a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: