I have been trying this setup for weeks and still can not make this to work...

ubuntu 12.04 64 bit with 2 nic

nic1: eth0: -static ip with internet access (connected to modem)

nic2: eth1: -static ip connected to LAN.

enabled ip_forward on ubuntu box net_ip_forward = 1

on the LAN with ip address specified gateway as and able to ping gateway.But can not ping public address.What am i missing? on router box:

route -n

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    100    0        0 eth0   U     0      0        0 eth1   U     0      0        0 eth0


ip route add via dev eth0

route -n on LAN

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    100    0        0 eth0   U     0      0        0 eth0   UG    0      0        0 eth0

iptables default policy is to accept all.

tracepath from LAN

  1:                                           0.060ms pmtu 1500

  1:                                           3.367ms 

  1:                                           3.764ms 

   2:  no reply

Is there a way to make this work,other than NAT ing.

1 is not a public address either. What box is that? Does it know how to route traffic back to Does it do NAT for networks other than

| improve this answer | |
  • is a D-link router connected to a modem.It doesnt know abot network. – Blue Gene Oct 15 '12 at 7:53
  • 1
    There's your problem then. – ptman Oct 15 '12 at 7:54
  • Can u please guide me with fixing this.When i used clear os.It worked with out much effort.All i did was specified as external in the graphical mode.But with Ubuntu i am stuck./ – Blue Gene Oct 15 '12 at 7:57
  • It's not ubuntu that needs configuring, it's the d-link router. – ptman Oct 15 '12 at 9:58
  • x2 - your D-Link needs a static route to via Make sure your D-Link also is set to NAT both subnets. – rnxrx Oct 15 '12 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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