Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed Ubuntu server 12.04 after that I installed dhcp3-server and configured it like this:

At isc-dhcp-server


And in dhcpd.conf

# A slightly different configuration for an internal subnet.
subnet netmask {
  option domain-name-servers;
  option domain-name "nazwa.local";
  option routers;
  option broadcast-address;
  default-lease-time 600;
  max-lease-time 7200;

Also I have two eth interfaces:

# second netowrk interface
auto eth0
iface eth0 inet static

# The primary network interface
auto eth1
iface eth1 inet dhcp

When I plug computer to eth0 I get propertly ip adress but I can't visit any sites. I do even this:

echo 1 > /proc/sys/net/ipv4/ip_forward 
share|improve this question
up vote 1 down vote accepted

I do this:

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
    up /sbin/iptables -t nat -A POSTROUTING -s -d 0/0 -j MASQUERADE

And everything worked!

share|improve this answer

Your Answer


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.