linux router

linux router

Post by Jordan Flemi » Tue, 27 Jul 2004 13:37:56



I am trying to network my SuSE Linux 9.1 machine and an ibook with mac
OS X version 10.2.8.  The linux box is behind a cable modem and is
hooked up to the modem via eth1 and the laptop is hooked up through a
switch to eth0.  I have made changes to /etc/sysconfig/sysctl,
IP_FORWARD="yes", and /proc/sys/net/ipv4/ip_forward, 1.  route -vn
gives this:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref  
Use Iface
12.216.158.0    0.0.0.0         255.255.255.0   U     0      0      
0 eth1
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0      
0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0      
0 lo
0.0.0.0         12.216.158.1    0.0.0.0         UG    0      0      
0 eth1

Both ethernet interfaces are activated.  eth1 (connected to the cable
modem) boots DHCP and automatic.  eth0 boots static and manual.  The
modem's ip is 12.216.158.1, eth1 12.216.158.156, eth0 192.168.0.254,
laptop 192.168.0.1.  All interfaces are active, ifconfig on the linux
box gives:

eth0      Link encap:Ethernet  HWaddr 00:04:5A:54:E7:FE
          inet addr:192.168.0.254  Bcast:192.168.0.255
Mask:255.255.255.0
          inet6 addr: fe80::204:5aff:fe54:e7fe/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:49 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:6 dropped:0 overruns:0 carrier:12
          collisions:0 txqueuelen:1000
          RX bytes:3420 (3.3 Kb)  TX bytes:546 (546.0 b)
          Interrupt:12 Base address:0xdc00

eth1      Link encap:Ethernet  HWaddr 00:04:5A:54:E8:41
          inet addr:12.216.158.156  Bcast:255.255.255.255
Mask:255.255.255.0
          inet6 addr: fe80::204:5aff:fe54:e841/64 Scope:Link
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500
Metric:1
          RX packets:355907 errors:0 dropped:0 overruns:0 frame:0
          TX packets:86954 errors:0 dropped:0 overruns:0 carrier:0
          collisions:425 txqueuelen:1000
          RX bytes:156438156 (149.1 Mb)  TX bytes:9298630 (8.8 Mb)
          Interrupt:5 Base address:0xe000
...

and the laptop indicates it's active as well.  I am not sure how to
use route to display the routing table for the laptop but netstat -r
seems to give me what I'm looking for.  But I am not sure what should
and what should not be there.  But I know this, the default gateway is
192.168.0.254.

iptables -L gives this (right now thought i have tried many things and
have no idea what's wrong):

Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  12-216-158-1.client.mchsi.com  192.168.0.1

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere

I am running the default linux kernel and I checked /proc/config.gz
and the kernel should have routing enables; zcat /proc/config.gz
|fgrep ROUTE:

CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_ROUTE_FWMARK=y
CONFIG_IP_ROUTE_NAT=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_TOS=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_MROUTE=y

It seems as though everything is enables in the default kernel.

Any help would be very appreciated.  I am new at this (never networked
before) so I don't really know what I'm doing.

Thanks!

Jordan

 
 
 

linux router

Post by David Efflan » Tue, 27 Jul 2004 23:36:12



Quote:> I am trying to network my SuSE Linux 9.1 machine and an ibook with mac
> OS X version 10.2.8.  The linux box is behind a cable modem and is
> hooked up to the modem via eth1 and the laptop is hooked up through a
> switch to eth0.  I have made changes to /etc/sysconfig/sysctl,
> IP_FORWARD="yes", and /proc/sys/net/ipv4/ip_forward, 1.  route -vn
> gives this:

> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref  
> Use Iface
> 12.216.158.0    0.0.0.0         255.255.255.0   U     0      0      
> 0 eth1
> 192.168.0.0     0.0.0.0         255.255.255.0   U     0      0      
> 0 eth0
> 127.0.0.0       0.0.0.0         255.0.0.0       U     0      0      
> 0 lo
> 0.0.0.0         12.216.158.1    0.0.0.0         UG    0      0      
> 0 eth1

You forgot to say what is, or is not, working.  Can the Mac reach Linux?  
If so, but it cannot reach internet, you likely just need to configure
/etc/sysconfig/SuSEfirewall2 to masquerade your LAN as your public IP.  
The internet is not going to know how to route private 192.168.x.x
addresses.

- Show quoted text -

Quote:> Both ethernet interfaces are activated.  eth1 (connected to the cable
> modem) boots DHCP and automatic.  eth0 boots static and manual.  The
> modem's ip is 12.216.158.1, eth1 12.216.158.156, eth0 192.168.0.254,
> laptop 192.168.0.1.  All interfaces are active, ifconfig on the linux
> box gives:

> eth0      Link encap:Ethernet  HWaddr 00:04:5A:54:E7:FE
>           inet addr:192.168.0.254  Bcast:192.168.0.255
> Mask:255.255.255.0
>           inet6 addr: fe80::204:5aff:fe54:e7fe/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:49 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:7 errors:6 dropped:0 overruns:0 carrier:12
>           collisions:0 txqueuelen:1000
>           RX bytes:3420 (3.3 Kb)  TX bytes:546 (546.0 b)
>           Interrupt:12 Base address:0xdc00

> eth1      Link encap:Ethernet  HWaddr 00:04:5A:54:E8:41
>           inet addr:12.216.158.156  Bcast:255.255.255.255
> Mask:255.255.255.0
>           inet6 addr: fe80::204:5aff:fe54:e841/64 Scope:Link
>           UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500
> Metric:1
>           RX packets:355907 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:86954 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:425 txqueuelen:1000
>           RX bytes:156438156 (149.1 Mb)  TX bytes:9298630 (8.8 Mb)
>           Interrupt:5 Base address:0xe000
> ...

> and the laptop indicates it's active as well.  I am not sure how to
> use route to display the routing table for the laptop but netstat -r
> seems to give me what I'm looking for.  But I am not sure what should
> and what should not be there.  But I know this, the default gateway is
> 192.168.0.254.

> iptables -L gives this (right now thought i have tried many things and
> have no idea what's wrong):

> Chain INPUT (policy ACCEPT)
> target     prot opt source               destination
> ACCEPT     all  --  anywhere             anywhere

> Chain FORWARD (policy ACCEPT)
> target     prot opt source               destination
> ACCEPT     all  --  12-216-158-1.client.mchsi.com  192.168.0.1

> Chain OUTPUT (policy ACCEPT)
> target     prot opt source               destination
> ACCEPT     all  --  anywhere             anywhere

> I am running the default linux kernel and I checked /proc/config.gz
> and the kernel should have routing enables; zcat /proc/config.gz
>|fgrep ROUTE:

> CONFIG_IP_ADVANCED_ROUTER=y
> CONFIG_IP_ROUTE_FWMARK=y
> CONFIG_IP_ROUTE_NAT=y
> CONFIG_IP_ROUTE_MULTIPATH=y
> CONFIG_IP_ROUTE_TOS=y
> CONFIG_IP_ROUTE_VERBOSE=y
> CONFIG_IP_MROUTE=y

> It seems as though everything is enables in the default kernel.

> Any help would be very appreciated.  I am new at this (never networked
> before) so I don't really know what I'm doing.

> Thanks!

> Jordan


 
 
 

1. linux router Vs Linksys Router

Any body had experience of both a standalone router (eg d-link/linksys 4port
switch and router integrated into 1 box) Vs old 486 with a flavour of linux
acting as a router with a hub/switch to share a DSL connection?

You can get the former for about 50GBP and it seams a lot less of a pain to
set up and use.

Comments?

Cheers
Stu

2. nobody vs. noaccess

3. Linux router vs Netopia router on DSL

4. MICROSOFT 2 PURCHASE NETSCAPE! With what? FOODSTAMPS?

5. Linux Router Project (LRP): Make just a router ???

6. Newbie question on install possibilities

7. Suse Linux Router hinter Cisco Router ???

8. SCO OS5 on Pentium Pro - any problems?

9. Cisco router or Linux router ?

10. Cable modem with Linux Router Project & Fireplug Edge Router - help with wierd ports!

11. Linux Router or Cisco Router for Small Office Internet Line

12. Linux Router vs. Linux Firewall

13. Questions about network Structure Linux using Linux Router/Firewall