Forwarding data between two interfaces

Posted by user84471 on Ask Ubuntu See other posts from Ask Ubuntu or by user84471
Published on 2012-10-29T13:17:49Z Indexed on 2012/10/31 11:14 UTC
Read the original article Hit count: 186

Filed under:

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 

© Ask Ubuntu or respective owner

Related posts about dhcp