LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to assign Debian running on virtual box a static ip? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-assign-debian-running-on-virtual-box-a-static-ip-781601/)

peterson.julia 01-11-2010 09:51 PM

How to assign Debian running on virtual box a static ip?
 
Hi I would like to assign a static IP to Debian running on my virtual box. How should I do it? What needs to be written in /etc/network/interfaces. Something extra? Thx

r3sistance 01-11-2010 10:30 PM

Hi,

If you mean do you need to set up anything extra for a static IP in Debian on a VPS, not within debian itself. You may have to setup a gateway on the VPS hosting software or main host itself depending on the type of networking that is going on and if the VPS software is set to automatically forward all traffic straight out on the main network feed or into a virtual network.

If you need a guide for setting up Debian Static IPs themselves, I found one on a quick google search here.

peterson.julia 01-12-2010 12:26 AM

Quote:

Originally Posted by r3sistance (Post 3823243)
Hi,

If you mean do you need to set up anything extra for a static IP in Debian on a VPS, not within debian itself. You may have to setup a gateway on the VPS hosting software or main host itself depending on the type of networking that is going on and if the VPS software is set to automatically forward all traffic straight out on the main network feed or into a virtual network.

If you need a guide for setting up Debian Static IPs themselves, I found one on a quick google search here.





Thank you, but what I want to do is create a virtual network on virtual box. debian will have as a server static ip. than using samba ill be able to connect to it windows host as well running on virtual host run on it bind and apache as on real server with static ip . I dont know how to do that in virtual box so if you can please help with that. Thx

tacoe 01-12-2010 01:16 AM

Setting it as usually operater in not ok? System->administation->Network..
But using FC not Debian. : )

evo2 01-12-2010 03:46 AM

Setting a static in Debian is easy. Here is an example stanza for /etc/network/interfaces
Code:

auto eth0
iface eth0 inet static
        address 192.168.2.1
        network 192.168.2.0
        netmask 255.255.255.0
        broadcast 192.168.2.255

The problem you may have is understanding how the network is treated in virtual box in terms of connecting to your host machine. Have you read the networking section in the virtual box manual?

Evo2.

peterson.julia 01-12-2010 05:38 PM

Quote:

Originally Posted by evo2 (Post 3823462)
Setting a static in Debian is easy. Here is an example stanza for /etc/network/interfaces
Code:

auto eth0
iface eth0 inet static
        address 192.168.2.1
        network 192.168.2.0
        netmask 255.255.255.0
        broadcast 192.168.2.255

The problem you may have is understanding how the network is treated in virtual box in terms of connecting to your host machine. Have you read the networking section in the virtual box manual?

Evo2.

Thx.
To set it up in VirtualBox I go File>Preferences>Network>VirtualBox Host Only Adapter then Edit Netowk and in Host Only Network Detail I set IPv4 to 192.168.2.1 and DHCP disable and I have to enable on specific virutal host network settings as well. Thats it. Right?


All times are GMT -5. The time now is 02:55 PM.