Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

At isc-dhcp-server

INTERFACES="eth0"

And in dhcpd.conf

# A slightly different configuration for an internal subnet.
subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.5 192.168.1.100;
  option domain-name-servers 192.168.1.1;
  option domain-name "nazwa.local";
  option routers 192.168.1.1;
  option broadcast-address 192.168.1.255;
  default-lease-time 600;
  max-lease-time 7200;
}

Also I have two eth interfaces:

# second netowrk interface
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0

# 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

1 Answer 1

up vote 1 down vote accepted

I do this:

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
    address 10.0.0.1
    netmask 255.255.255.0
    up /sbin/iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -d 0/0 -j MASQUERADE

And everything worked!

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.