LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-17-2008, 04:52 PM   #1
TeddyB
LQ Newbie
 
Registered: Oct 2007
Location: Cleveland, OH
Distribution: Debian Etch, Knoppix for troubleshooting
Posts: 17
Blog Entries: 1

Rep: Reputation: 2
Networking Conflict Between Virtual Box Network Bridge & OpenSSH Server, Debian Etch


Hello;

I am running an AMD64 3300+ on an Epox motherboard with 1 Gig of Ram. the OS is 32 bit Debian Etch, upgraded to Kernel 2.6.23-1-i486. I am running two programs that are conflicting. One, Innotek VirtualBox. I have a number of virtual machines including Windows and Linux OS's. I use them for experimentation, studying, and the occasional Windows App. (Haven't gotten to WINE) they require internet and network support. Both to get online as well as to share my Data Drives on the Host OS. I refuse to let windows have direct control over any of my data hard drives, it likes to foul up drives. anyway, None of the virtual machines run at the same time, and I accomplished networking via a Network Bridge to the Host eth0. the following is from my /etc/network/interfaces file. the virtual Ethernet drive vbox0 is pointed to the network bridge (br0) via a configuration in virtual box itself.

Quote:

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.115
netmask 255.255.255.0
gateway 192.168.2.1

Create a Bridge for use with Virtual Machines
auto br0
iface br0 inet dhcp
bridge_ports eth0

auto eth0
The problem I am having is that this network bridge is conflicting with my OpenSSH Server. I have eth0 pulling a static IP on our network so that I may do a Port Forward from our router to connect to the server, everything works. but only after I comment the bridge out of the Interfaces document and reboot the system. Simply restarting networking doesn't seem to do it. (Using Command: #/etc/init.d/networking restart) I have to do a complete reboot. which obviously is a major pain in the rectum. I have been alternating the two back and forth up till now, but am using the Virtual Machines more and more as I study for certification. I need to find a solution that doesn't require me to reboot the system regularly. Is there a way I can either network without the bridge in the virtual machines, OR is there a service that I can restart that will not make me shut down the entire system. I have included my /etc/ssh/sshd.config info below.

Thank you for your time;
Tim

Quote:

# Package generated configuration file
# See the sshd(8) manpage for details

# What ports, IPs and protocols we listen for
Port 8000
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
ListenAddress 192.168.2.115
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin no
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
Banner UNKNOWN

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

UsePAM yes
 
Old 11-17-2008, 05:05 PM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 87
I'm playing around in the dark a little here, but try this, obviously keeping a backup of your interfaces file!

Change bolded parts:

Quote:
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.115
netmask 255.255.255.0
gateway 192.168.2.1

Create a Bridge for use with Virtual Machines
auto br0
iface br0 inet dhcp
bridge_ports eth0

auto eth0
to:

Code:
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.115
netmask 255.255.255.0
gateway 192.168.2.1

Create a Bridge for use with Virtual Machines
auto br0
iface br0 inet static
address 192.168.2.201 ## or something not in use!
netmask 255.255.255.0
gateway 192.168.2.1
bridge_ports eth0

auto eth0
I really don't know if this is supported in bridging, but surely you have to be able to assign a VM a real static IP address on the network, in order to support VM servers?
 
Old 11-17-2008, 08:03 PM   #3
TeddyB
LQ Newbie
 
Registered: Oct 2007
Location: Cleveland, OH
Distribution: Debian Etch, Knoppix for troubleshooting
Posts: 17

Original Poster
Blog Entries: 1

Rep: Reputation: 2
No Dice

alright, No Dice...

I made the changes you suggested, Pulling IP address 192.168.2.116 for br0 (I am using numbers 115 and 116 because there are other systems on our network that pull dynamic IP's, but not 15 of them. since IP's are usually assigned by the router sequentially, I am pulling static IP's above the pool)

anyway, I configured, did a /etc/init.d/network restart. br0 pulled the IP as shown by ifconfig, but same as usual, SSH worked (had the br0 commented out before) and the Virtual machines refused to pull an IP. I rebooted, the virtual machines network lit up like a Christmas tree, but SSH would no longer respond.

Interestingly though, the br0 pulled IP 116, but the VM's where pulling dynamic address 104, and 107. I set it to static 116, rebooted everything and they wouldn't communicate anymore. I reset it to dynamic and it lit up again. almost like it was having an IP conflict with itself, or it's own interface / bridge at least.

I tested the settings on both VM's running MS XP Professional, and Vista Ultimate. Unfortunately My SUSE 10 VM is refusing to boot and giving me some really annoying error that I don't have the patience for at the moment. but I'm sure it would behave the same.
 
Old 11-18-2008, 09:20 AM   #4
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 87
Hmm, at this stage it's beyond my knowledge level I'm afraid.

On the other hand, some other people have done this kinda thing before, take a look at this: http://samiux.wordpress.com/2007/07/...on-virtualbox/

and more complex:
http://en.opensuse.org/Virtualbox_Network_Bridging

and from VirtualBox:
http://forums.virtualbox.org/viewtopic.php?t=1787
 
Old 11-19-2008, 05:25 AM   #5
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,591

Rep: Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167
I have been using VirtualBox 2.0.4 OSE with a Win98 virtual machine. To get the Win98 virtual machine to network with the host Linux system I needed to use host networking in VirtualBox, but this did not allow for internet access from the virtual machine. I then added a proxy server (tinyproxy) to my host system and configured my virtual machine to use the proxy server. Now I have both networking and internet access for the virtual machine.
 
  


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
LXer: I clean up the OpenSSH mess on my Debian Etch box LXer Syndicated Linux News 0 05-17-2008 09:10 AM
LXer: Trying OpenSSH in Debian Etch ... plus thoughts on security, sudo and nano vs. LXer Syndicated Linux News 0 03-05-2008 07:30 AM
LXer: Virtual Machine Replication & Failover with VMWare Server & Debian Etch (4.0) LXer Syndicated Linux News 0 08-19-2007 01:50 PM
LXer: Using DSPAM & ClamAV With Postfix (Virtual Users) On Debian Etch LXer Syndicated Linux News 0 08-16-2007 09:20 PM
tun bridge to VirtualBox on debian etch crashsystems Linux - Networking 5 01-30-2007 03:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:55 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
Open Source Consulting | Domain Registration