?
Solved

routing

Posted on 2000-05-07
7
Medium Priority
?
214 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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
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 120 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

Docker-Compose to Simplify Multi-Container Builds

Our veteran DevOps Author takes you through how to build a multi-container environment, managed with a single utility in order to simplify your deployments.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month13 days, 2 hours left to enroll

777 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