3

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 
user84471
  • 399

1 Answers1

1

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!

user84471
  • 399