LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-08-2003, 04:35 AM   #1
Noryungi
Member
 
Registered: Jul 2003
Location: --> X <-- You are here.
Distribution: Slackware, OpenBSD
Posts: 305

Rep: Reputation: 53
ppp0/route problem.


Somebody **please help me!**

(I am going crazy here...)

Here is the problem:

I have 2 Slackware 9.0 machines, one of these is connected to a modem on /dev/modem. Both are also connected to a LAN through /dev/eth0. I also have a Windows 98 machine, attached to the LAN through its own ethernet card.

The LAN works great: I can ping, traceroute and ssh/sftp back and forth between the three machines. Absolutely no problem. My final goal is to have a Linux gateway for my LAN to the Internet, in such a way that all my machines can connect to the Internet, going through the gateway.

Using pppsetup, I created a script to connect to my ISP on the machine that has the modem.

The script works great, and I can connect to the ISP with no problem whatsoever.

BUT... the "ppp-go" script prints out a message saying "did not replace default route eth0" or some such. I can't connect to the Internet, even though the ppp0 interface is active.

Entering "route -e" or "route -n", I can see the different kernel routes... but not "ppp0". The default route through "/dev/eth0" is there.

If I try to add a default "route" through "ppp0", I still can't connect to the Internet, even though "ppp0" appears in the routing table.

But I can manually add a route to, for instance, www.google.com... and I can then connect to google, but not to the rest of the Internet.

A friend of mine has suggested adding a default route to the IP address of my ISP... Can anyone confirm this??

Please help me, people and many thanks in advance...
 
Old 07-08-2003, 05:31 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
You need to run
route del default
route add default ppp0

There was a problem while replacing old default route (LAN). What you need to add in your scrip is:
route del default
before you start ppp0 (or after the script is finished, the two commands above).

Remember, that you need a short firewalling script - for masquarading, to allow other machines access the Net. There are many posted to this forum, just search and choose the one you like best.
 
Old 07-08-2003, 04:51 PM   #3
Noryungi
Member
 
Registered: Jul 2003
Location: --> X <-- You are here.
Distribution: Slackware, OpenBSD
Posts: 305

Original Poster
Rep: Reputation: 53
Thanks Mara, that helped!

I also needed to remove some wrong gateway configuration from /etc/rc.d/rc.inet1, since the gateway was configured with its own IP address as... a gateway.

Entering the default route, as you mentioned, allowed me to have access to the Internet from the gateway.

As you mentioned, I am going to look carefully at this forum and at some others to get more information about NAT and firewall.

Thanks again!
 
  


Reply



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
eth1 and ppp0, need to send UDP packets through ppp0 smhs Linux - Networking 2 07-12-2005 08:54 AM
ppp0 default route jjj0001 Linux - Networking 1 04-08-2005 12:45 AM
Newbie Question: Route all request coming from eth1 to ppp0/dsl0/eth0 hansschmucker SUSE / openSUSE 0 02-12-2005 09:38 PM
Endless Loop: ppp0 Unregister Netdevice: waiting for ppp0 to be free. oberon-ken-obi Linux - Networking 1 07-20-2004 11:04 PM
kppp doesn't assign default route to ppp0 damion Linux - Networking 2 03-01-2003 04:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:35 PM.

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