Please help with networking:

Discussions about using Linux guests in VirtualBox.
Post Reply
Ub3rZ4chY
Posts: 2
Joined: 9. Mar 2013, 19:46

Please help with networking:

Post by Ub3rZ4chY »

First off I know I might get poked at for posting this but I have tried endlessly googling, and trying to understand things but my head is full of fog right now,

Basically I have a linux VM, Its a Ubuntu server latest LTS version, I know and have successfully used VBOX manage to forward and allow port 2222 for my SSH needs.
My situation is that I wish for my virtual machine to have its own internal ip as if it were connected into my router... such as 192.168.*.*, I have tried using host-only and manually configuring the DHCP but Its not showing in ifconfig, I think im doing something wrong here, I am very confused, could someone please show me how to get a eth1 on the VM to act as if it were inside my internal network so it has my routers gateway, its own internal ip, and its own manual dns settings etc.

I have been able to do this before many times, but I completely forget I am usually computer savy, but when it comes to networking my brain explodes.

Current example of what I wish to achieve;

Say I wished to SSH to my VM, Id rather be able to SSH via its own internal ip vs using the same IP of the machine its hosted on (localhost).
this is so that I can have internet access without it "sharing" the same internet as my host pc, without it using the same internal ip

I dont know if this is making any sense but it would be appreciated if someone could assist me, and explain how to achieve this, thanks.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Please help with networking:

Post by Perryg »

I wish for my virtual machine to have its own internal ip as if it were connected into my router...
Just use bridged mode in the guest settings -> network.

Then if you want you can even configure a static IP address ( in the guest ) so it does not change.
Ub3rZ4chY
Posts: 2
Joined: 9. Mar 2013, 19:46

Re: Please help with networking:

Post by Ub3rZ4chY »

Okay this solved it, when using both NAT and bridged it wont work.
Post Reply