Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 26th August 2009, 05:20 AM
urilabob Offline
Registered User
 
Join Date: Sep 2005
Posts: 113
macosfirefox
Preventing Host OS from using a specific NIC

This will initially sound like a virtualbox problem, but please bear with me, the underlying question is about network configuration. I have a virtualbox installation, and I need fairly high security separation between host and guest traffic. The university network the box hangs off uses statically-allocated ip addresses, allocated to fixed MAC addresses (i.e. it eats any traffic with mismatched ip and MAC addresses).

VBox: 3.0.4
Guest OS: Fedora 11 64bit
Hardware: dual NIC, Intel server
Bridged networking, with separate NICs for host and guest

I'm aiming for high-security separation between host and guest traffic. To do this, I would like to to run all host traffic through one NIC, H, and all guest traffic through the other, G. The host and guest have separate, statically allocated, IP addresses, IPH and IPG. The network forces these to be mapped to specific MAC addresses, MACH (the address of NIC H) and MACG (the address of NIC G). So it's not too hard to write host firewall rules to enforce this policy. The rules just have to state that traffic coming into H must have a destination compatible with IPH, and traffic going out must have IPH as source - and vv for G and IPG. There also don't seem to be any trouble telling the guest to only use NIC G. As a result, turning off NIC G (or equivalently, firewalling it off from host traffic) crashes the network, I have to reboot it to get networking working.

But I can't figure how to tell the host to _only_ use NIC H for anything else except the guest. Even though we don't see any IPH traffic coming into NIC G from outside, I don't seem to be able to stop the host from starting connections on NIC G. Does anyone know any way to do this - to tell the host that it can only use IPH as its IP address unless traffic is coming from a guest process, and that it can only use address MACH and NIC H? I've been reading route and arp manuals all day, but I can't seem to figure anything on this - mainly because arp and route don't know about host/guest processes, and I guess weren't designed with this in mind...

TIA for any help

Bob
Reply With Quote
  #2  
Old 26th August 2009, 07:26 PM
urilabob Offline
Registered User
 
Join Date: Sep 2005
Posts: 113
macosfirefox
Now solved (but the solution is probably very specific to the environment). I have told the host that eth1 is a dhcp-allocated address (lying to your OS is fun!). So it tries (but always fails, since there is no dhcp server) to get a dhcp address for eth1. Thus it can only use eth0 for its comms. Meanwhile, the guest is perfectly happy to use eth1 with the fixed ip address it knows about. I assume this works because virtualbox accesses the host networking capabilities at a low level, presumably directly calling the network card drivers, and isn't going through the host's arp and route setup.

Last edited by urilabob; 26th August 2009 at 07:29 PM.
Reply With Quote
  #3  
Old 26th August 2009, 07:44 PM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,300
linuxfedorafirefox
It sound like the correct solution is a routing table entry.

You may want to play with the
ip route show
or oldschool style
route
commands.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #4  
Old 27th August 2009, 03:21 AM
urilabob Offline
Registered User
 
Join Date: Sep 2005
Posts: 113
macosfirefox
That's what I'd been trying. But I'm not sure it's possible. To do what I want, the host routing system would have to know something like "if a connection is being established from or to IPG, it must go through NIC G and use MACG (all that, of course is OK), _and_ the local process it is communicating with must be associated with the guest virtual machine". I'm reasonably convinced, by now, that the second half is simply not expressible in route (ip route) language (and I don't think arp can do it either).
Reply With Quote
  #5  
Old 13th September 2009, 03:45 PM
urilabob Offline
Registered User
 
Join Date: Sep 2005
Posts: 113
macosfirefox
The solution I mentioned earlier ended up failing, because someone started up a dhcp server on the subnet. Not quite sure why - it's hard to figure any way it would be useful to them. So anyway, the host was able to get a dhcp address for the NIC and started using it. So I changed the configuration to tell the host that NIC G had a fixed 169.x.x.x address. That seems to work - it recognises that no valid routing can be done over that NIC, and doesn't attempt to use it.
Reply With Quote
Reply

Tags
host, nic, preventing, specific

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Associating specific DNS's with specific ethers Jakkals Servers & Networking 0 9th July 2009 02:29 PM
SElinux is preventing... Beralus Security and Privacy 4 18th November 2008 08:24 AM
Preventing partitions access for specific users LDC Using Fedora 15 29th June 2008 11:40 AM
Lost connections to host after changing host name km4hr Servers & Networking 1 20th September 2006 05:09 PM
configure IPsec host-host for FC5 jayendhiran EOL (End Of Life) Versions 0 26th July 2006 10:18 AM


Current GMT-time: 07:13 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat