WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: problems with two NIC router  (Read 2016 times)

Offline lunabuna

  • Newbie
  • *
  • Posts: 6
problems with two NIC router
« on: September 19, 2013, 08:28:12 AM »
Hi,

I need some help to finish the setup of a router. It is a ATOM board and all the admin work is made with ssh (remote, so not screen/keyboard).
I want to setup a router with TC version 4.7.6.

I have two cards :
eth0 is the LAN side with address 192.168.1.1
eth1 is the WAN side with address 10.10.10.2
 The ADSL router is 10.10.10.1

I installed udhcpd and bind and both NICs are working fine.

I created the /etc/udhcp.conf with the following content:

Code: [Select]
start 192.168.1.2
end 192.168.1.10
interface eth0
option subnet 255.255.255.0
option router 192.168.1.1
option lease 259200
option dns 192.168.1.1
lease_file /tmp/udhcpd.leases
option domain home
pidfile /tmp/udhcpd.pid


I can ping from eth1 (WAN) to 10.10.10.1 but not from eth0 (LAN).
So I updated also the iptables:

Code: [Select]
root@box:~# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere           
ACCEPT     all  --  anywhere             anywhere           
LOG        all  --  anywhere             anywhere             LOG level warning

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
root@box:~#


But even now the requests from LAN do not reach WAN. What is wrong ???

With route I see: (livebox.home is my ADSL router 10.10.10.1)

Code: [Select]
root@box:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         livebox.home    0.0.0.0         UG    0      0        0 eth1
10.10.10.0      *               255.255.255.0   U     0      0        0 eth1
127.0.0.1       *               255.255.255.255 UH    0      0        0 lo
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
192.168.1.1     livebox.home    255.255.255.255 UGH   0      0        0 eth1
root@box:~#


Someone has an idea how to make it work ?? I read the forums and I didn’t found clear info regarding how to proper setup a router with TC...

Apparently the main issue is that the eth0 do not communicate with eth1... I tried with "ping -I eth0 10.10.10.1" and no reply, but it works with "ping -I eth1 10.10.10.1".

Some ideas ??


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: problems with two NIC router
« Reply #1 on: September 19, 2013, 01:18:56 PM »
The only barriers that can stop you are the ones you create yourself.

Offline lunabuna

  • Newbie
  • *
  • Posts: 6
Re: problems with two NIC router
« Reply #2 on: September 20, 2013, 07:03:45 AM »
Sorry Curaga, but no success.
The ip_forward option is set but nothing happened.

maybe there is a specific order to start the services ?? eth0/eth1, then iptables  ??