Solved

routing

Posted on 2000-05-07
7
204 Views
Last Modified: 2010-04-20
I set up two modems on a different networks. On the dialin server I created the user ppp with ppplogin script as his shell. Everything works fine except the command I implemented in ppplogin script: "route add -net ???.???.???.??? gw ???.???.???.???" never executes.
When I telnet from a comp that dials the modem and issue route command I am able to telnet from one network to the other. Is there any solution to this?
0
Comment
Question by:Malensek
7 Comments
 
LVL 2

Expert Comment

by:mzehner
ID: 2786799
I know if you don't type the command exactly as route likes it, it will ignore it.  Try:
route add -net xxx.xxx.xxx.xxx netmask 255.255.255.255.0 gw xxx.xxx.xxx.xxx
Or whatever your correct netmask is.
Also check your routes with the route command after entering them to be sure it worked.  I think the command is "route -a".
0
 

Expert Comment

by:eureeka
ID: 2786981
Are you putting the full path to the route binary? I believe its:

/sbin/route add -net etc...

Also, make sure this script is owned by root.

eureeka
0
 

Author Comment

by:Malensek
ID: 2787650
I appologize for typing mistake my command is as follows : "/sbin/route add -net ???.???.???.??? netmask 255.255.255.0 gw ???.???.???.???" I am sure there is a problem with the ppp user. I have also issue "chmod +s /sbin/route" to give the process a root privilege, but it doesnt work (just with ppp user that has ppplogin script as his shell).
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Expert Comment

by:ksemat
ID: 2787651
I think they've pretty much summed it all up make sure you're using the full path to the route command that is what I also thinkmis the problem
make sure you have no misspellings in your command
0
 
LVL 4

Accepted Solution

by:
kiffney earned 30 total points
ID: 2788416
Try putting the command in the /etc/ppp/ip-up script.  Something like:

if [ "$5" = "128.1.2.2" ] ; then
        route add -net 128.1.2.0 netmask 255.255.255.0 dev $1

where 128.1.2.2 is the number you're giving the dialing-in machine, and dev $1 will be replaced with ppp0 or whatever number the ppp device is automagically assigned.  This script executes with pppd's privileges and works with the default permissions on my RedHat distribution.  
0
 

Expert Comment

by:suguinha
ID: 2790746
Try "/sbin/route add -net ???.???.???.??? netmask 255.255.255.0 gw ???.???.???.??? dev pppX"
0
 

Author Comment

by:Malensek
ID: 2804619
I have just put the command in /etc/ppp/ip_up and it worked.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now