Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have recently setup a DHCP-Server on an Ubuntu 10.04 server machine. The machine has two interfaces (eth0, eth1). I have the DHCP server setup correctly because computers connecting to the network get a DHCP IP address but they cannot connect to the outside world.

I believe it has to do with the two interfaces being mapped/bridged together. How do I properly map one interface to the other? Is it bridging or mapping?

I see on this page: https://help.ubuntu.com/community/dhcp3-server they do something like

mapping hotplug
    script grep
    map eth1

What does that exactly do?

In other places I see the following:

iface br0 inet static
bridge_ports eth0 eth1

Which is better or more efficient?

Sorry for all the questions, I'm a noob at setting up a DCHP Server.

Thanks for your help.

EDIT:

This question is in relation to a previous question I asked on ServerFault: Is it possible to setup a DHCP Server for localhost only?.

Basically I want to setup one interface (eth0) to connect to the outside world while (eth1) listens for DHCP requests from the VM's (bridged network setting in VMWare). It's setup on a server and the VM's are properly getting the DHCP IP's but they cannot see the outside world. :(

I used the configuration files from this post as a baseline to setup DHCP http://ubuntuforums.org/showthread.php?t=825294 (only difference we have 2 interfaces while they have 3) but unfortunately they didn't share their interfaces setup and its an old post.

share|improve this question
    
What are the two interfaces connected to? What are you using two interfaces for? (For load distribution? For redundancy? To connect to two different networks?) –  David Schwartz Oct 21 '11 at 18:21
    
While they might be getting an IP address, are they getting the correct gateway assigned? –  Justin Pearce Oct 21 '11 at 18:25
    
Hey David/Justin, thanks for your speedy response. I've updated the post with more details. –  thiesdiggity Oct 21 '11 at 18:36
    
Have you set up NAT? If you're giving the VMs local IPs, they won't be able to talk to the outside world without masquerading. –  David Schwartz Oct 21 '11 at 21:32

1 Answer 1

To setup masquerading quickly (and add firewalling) install the shorewall-perl package. Use the two-interface configuration from /usr/share/doc/shorewall/examples/two-interfaces to get started.

It expects the Internet to be on the eth0 interface. Your DHCP server should be handling eth1. The Shorewall site has lots of documentation. You can install the shorewall-doc package to get a local copy of the documentation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.