Link to home
Start Free TrialLog in
Avatar of linuu
linuu

asked on

Routing problem on slackware Linux 10.1 am i missing something?

Scenario:

ISP (218.1.1.1) Public IP
|
|
EXT Interface on linux box (218.1.1.2) Public IP
|
INT Interface on linux box (218.1.2.2) Public IP
|
|
Ext Interface on cisco router (218.1.2.3) Public IP
|
INT Interface on cisco router (10.1.1.1) Private IP
|
|
Internal network Private range


Router is performing NAT

all packets from host on internal network can reach ISP fine.  tcpdump on linuxbox EXT Interface shows packets going out to ISP and coming back on EXT Interface but stopping there.  Packets should be routed back through Linux box INT Interface to Router but are not.

IP_forward has been set to 1 and rp_filter is disabled.  Linux box is running slackware version 10.1

when i setup another machine that plugs into the EXT interface of Linux box with the ISPS IP i can ping it!
cleared arp caches not sure what else to do
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of linuu
linuu

ASKER

This is an output from tcp dump on both interfaces:

firewall.test = nat'd router ip address 218.1.2.3

tcpdump -i eth0 icmp:

16:39:39.429781 IP 502.gi0-2.ar1.cas9.comm.net.au > firewall.test: icmp 80: echo request seq 0
16:39:39.429788 IP firewall.test > 502.gi0-2.ar1.cas9.uecomm.net.au: icmp 80: echo reply seq 0
16:39:39.430854 IP 502.gi0-2.ar1.cas9.comm.net.au > firewall.test: icmp 80: echo request seq 1
16:39:39.430859 IP firewall.test > 502.gi0-2.ar1.cas9.uecomm.net.au: icmp 80: echo reply seq 1
16:39:39.431975 IP 502.gi0-2.ar1.cas9.comm.net.au > firewall.test: icmp 80: echo request seq 2
16:39:39.431984 IP firewall.test > 502.gi0-2.ar1.cas9.uecomm.net.au: icmp 80: echo reply seq 2
16:39:39.432980 IP 502.gi0-2.ar1.cas9.comm.net.au > firewall.test: icmp 80: echo request seq 3
16:39:39.432986 IP firewall.test > 502.gi0-2.ar1.cas9.uecomm.net.au: icmp 80: echo reply seq 3
16:39:39.433969 IP 502.gi0-2.ar1.cas9.comm.net.au > firewall.test: icmp 80: echo request seq 4

tcpdump -i eth1 icmp:
16:39:39.429781 IP 502.gi0-2.ar1.cas9.comm.net.au > firewall.test: icmp 80: echo request seq 0
16:39:39.430854 IP 502.gi0-2.ar1.cas9.comm.net.au > firewall.test: icmp 80: echo request seq 1
16:39:39.431975 IP 502.gi0-2.ar1.cas9.comm.net.au > firewall.test: icmp 80: echo request seq 2
16:39:39.432980 IP 502.gi0-2.ar1.cas9.comm.net.au > firewall.test: icmp 80: echo request seq 3

netstat -rn:
 netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
218.1.2.3  218.1.2.3  255.255.255.255 UGH       0 0          0 eth1
218.1.2.0  0.0.0.0         255.255.255.240 U         0 0          0 eth1
218.1.1.0  0.0.0.0         255.255.255.240 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         218.1.1.1  0.0.0.0         UG        0 0          0 eth0


from the tcpdump it looks like the router knows upstream to route packets back to the linux box...i think not sure though...that could be the problem.  
what about

route add -net 218.1.2.0 gw 218.1.1.2 netmask 255.255.255.0
Avatar of linuu

ASKER

ntellis that would just route packets between interfaces on the linux box...it already knows how to do that but thanks for the reply!

the problem is its not routing packets from the isp TO the internal interface

cheers
Avatar of linuu

ASKER

any other ideas im really stuck
Avatar of linuu

ASKER

Ok thanks for your help guys it turned out to be a problem at the isp as thought.

I subnet we had allocated were not routed to a particular ip before the change over but the router we had seemed to route our range anyways.  It was not doing NAT on the public IP's though....But at the ISPS end the mac addresses of all our public IPs were the same as the router.  WTF...anyways with the linux box in front or the new router and the isp routing packets to the ext int of the linux box works fine.  Basic routing 101.