Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.


  Search this Thread
Old 11-23-2007, 03:34 AM   #1
Registered: Jan 2004
Distribution: LFS
Posts: 91

Rep: Reputation: 15
Unhappy Getting LFS to be a router


Ok, before I start, everyone have a damned good giggle!

Yes, I fell into the trap of not documenting / backing up....! :O

Right, now to my problem / question...

My LFS6.0 was working fine until about 2 weeks ago when a power outage caused curruption to the primary partition. I had been trying for some time to get some stuff working, so I figured it was a good time to upgrade.

1 LFS6.2 CD (latest live install version) and a lot of sitting hunched up over the server later and it is up and running. Some nice things too!

Anyway, the box acts as, amongst other things, my internet firewall / router.

2 NICs
eth0 is my internal network.
eth1 is connected to my ADSL router (ADSL router is doing NAT and is

From linux box - can PING anything I want / need to.

From internal network can ping both eth0 and eth1 on linux box. I can't ping the ADSL router (or beyond) though.

I'm assuming that my box isn't routing / forwarding packets. (I never did understand why, in this situation I can ping the other interface on a box, but there you go!)

Where to now? I used to use route to set up a default route, but this seems to have been replaced by ip route .... which I can't figure out.

(as a side issue, I never did manage to figure out where to put the route command in the startup scripts and have always resorted to manually setting it up when the box is rebooted, so if I can fix this too!!!)

Can anyone provide me with a step-by-step guide on how to get this working before I go insane or am murdered by my frustrated family who can't get their daily internet fix? (Yes, it's open warfare amongst the kids fighting for the one PC I can connect directly to the 'net!!!!)

I have tried Googling, but the HOWTOS all seem to either be "How to set up an amazingly complicated router with 5 ISP links and policies for individual users traffic shaping" or "How to use the GUI on redhat to tick the right boxes."

Old 11-23-2007, 08:31 PM   #2
Gentoo Developer
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
This may help;
Old 11-25-2007, 11:12 PM   #3
Registered: Jan 2004
Distribution: LFS
Posts: 91

Original Poster
Rep: Reputation: 15
Thanks for that :-)

After exploring this page (and a few others suggested by various people elsewhere, I was still drawing a blank when ... it suddenly started working. Dunno why. Endless rebooting ind minor tweaks.

But then I couldn't contact the box itself. (Using SSH etc.).

A close look at the rc.iptables file and a bit of playing and I found that the lines involving the "lo" interface didn't work. As soon as I replaced with eth0 and eth1, everything was fine.

Obviously an error in my build somewhere. Can anyone tell me which file normally aliases lo to the local cards?




Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS 6.2: made mistake when going from lfs to root setup oldgeek Linux From Scratch 4 11-12-2006 09:00 PM
LFS question - lack of activity in LFS Forum nykey Slackware 4 06-05-2006 05:54 PM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM
LFS-7.0-cross-lfs-20050902-x86_64-Multilib Basel Linux From Scratch 0 09-03-2005 05:03 AM
cannot login as user 'lfs' [su - lfs] mayasedai Linux From Scratch 2 07-26-2005 06:10 AM > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 08:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration