Solved

routing

Posted on 2000-05-07
7
205 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VMWare 6 crashing 14 97
Linux "time" command output redirection 16 114
CentOS/RHEL 7 Linux maillog worldwide readable 2 40
linux redhat 7.2 10 36
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.…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

911 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

20 Experts available now in Live!

Get 1:1 Help Now