Solved

routing

Posted on 2000-05-07
7
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

696 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