LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-11-2010, 10:51 PM   #1
peterson.julia
Member
 
Registered: Nov 2009
Distribution: All flavors...
Posts: 37

Rep: Reputation: 1
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
 
Old 01-11-2010, 11:30 PM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 5.4, Mac OS 10.4 (tiger)
Posts: 1,005

Rep: Reputation: 79
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.
 
Old 01-12-2010, 01:26 AM   #3
peterson.julia
Member
 
Registered: Nov 2009
Distribution: All flavors...
Posts: 37

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by r3sistance View Post
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

Last edited by peterson.julia; 01-12-2010 at 01:28 AM.
 
Old 01-12-2010, 02:16 AM   #4
tacoe
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Rep: Reputation: 0
Setting it as usually operater in not ok? System->administation->Network..
But using FC not Debian. : )
 
Old 01-12-2010, 04:46 AM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
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.
 
Old 01-12-2010, 06:38 PM   #6
peterson.julia
Member
 
Registered: Nov 2009
Distribution: All flavors...
Posts: 37

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by evo2 View Post
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running Virtual box cjrissler Linux - Newbie 5 01-12-2010 12:05 AM
Running virtual pc files in a virtual machine in linux ... preferably virtual box biharibong Linux - Software 4 01-21-2009 02:04 PM
How do I assign a static IP to an interface on a Fedora Linux box? robcast Linux - Newbie 4 03-18-2008 01:37 PM
Howto Assign Multiple Static Public IP Addresses under SBC's PPPoE Static Ip system o trekgraham Linux - Networking 8 04-17-2007 11:51 AM
Assign Debian Static IP address - How? murfman89 Linux - Networking 3 11-02-2006 04:17 AM


All times are GMT -5. The time now is 09:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration