We help IT Professionals succeed at work.

Hoist the colors! We’ve added location flags to usernames sitewide, so it's easier to connect with the global community on EE. View My Profile


Trouble with forwarding.

jschaeffer asked
Last Modified: 2010-03-18
 I have two linux boxes, (ethernet connection) one I am trying to set up as a router with no luck. (PPP dial on demand / diald installed, works fine). I cannot get this kernel to forward any packets, I compiled all the TCP/IP support there is in the kernel config ( including ip-forward and ip-masq, but must not be working). I can connect to the computer fine (telnet, ftp, nfs...) , but I cannot go threw it. I can connect to the internet fine when on it (telnet'ed to it or direct), but none of my routing/forwarding is allowing me to forward threw it from the other computer. I tried everything from the mini-howto's on the subject with no results. I have the ipfwadm like all the examples. I have all the nessary modules loaded. I have the routing setup like the examples. Why can't I go threw that box!

router computer:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
nos.com         *      UH    0      0        0 sl0     *      UH    1      0        0 sl1
localnet        *        U     0      0        2 eth0
loopback        *            U     0      0        2 lo
hamnet          nos.com       UG    0      0        0 sl0
(diald set up sl1, sl0 is tnos, ham radio packet software. it is also not forwarding proberly. pppd will set the default route when it connects)

 ipfwadm -F -p deny
 ipfwadm -F -a m -S -D

other computer:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *        U     0      0       27 eth0
loopback        *            U     0      0       14 lo
default         musha.com         UG    0      0        0 eth0
(musha is the name of the router)

System specs:

router box:
386DX 33, 8 meg RAM, 130 Meg HD

other system:
486DX2 80, 32 meg RAM, 1.2 GIG + 420 Meg HDs

both have LINUX 2.0.30, modules 2.0.0 (all compiled myself)
router main install was Slackware 3.3
other main install was Slackware 3.2 (upgrade from 1.2.13)
I downloaded and reinstalled all the lib's, include files, kernel and modules, and other packages on the other computer. They are not from Slackware.
The router box only has the kernel and modules packages reinstalled.
Watch Question

I may be able to answer but could you elaborate on something, I had some and no luck doing exactly the same thing, If memory serves me...Do you have the router (which I assume uses a slip connection to the net and thena  Ethernet connection to the other computer) set up as a gateway.  i.e. on the  computer which can't connect in the routing table do you have the router's Ethernet IP address as a gateway, something like  route -add gw {router-eth-address} where router-... is the IP address of the Ethernet card.
Also you should know that you should not be connecting an LAN network to the net anyway, unless you have cubscribed for extra IP addresses, this may be why, because you have given the Ethernet on the "can't" computer an address which the Host and therefore Route will not process.
This one is on us!
(Get your first solution completely free - no credit card required)

I think you're routing table is wrong. You should have a default route in there. Although when you normally connect with pppd, a default route is added, when the machine in question is a router, I'm not sure how it's going to treat incomign packets when it has no default route set up.

I run an ipmasqerading router doing pretty much the same as you seem to want to do, and my default route is through the gateway on my ISP's end, and the gatewaydevice is set to sl0. When diald brings the link up, the default route becomes the one set by pppd.


That did the trick!! After adjusting the route everything works great!
Thanks a lot! Sorry for taking such a long time to respond. Had trouble with this site. ( login, connect problems )

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.