Solved

adding a route to the default gateway

Posted on 2002-05-24
8
222 Views
Last Modified: 2013-12-16
Hi,

I have Redhat 7.3 installed and I'm using KPPP to dial up my ISP.  The ISP uses dynamic IP and so I get a new IP address when I connect.

The problem is opera/mail etc can't communicate with the internet until I open a console and type

route add default gw <ipaddress>

where ipaddress is the one given to me by the ISP.

I'm obviously doing something wrong.

Can anyone tell me how to set this up so it all happens automatically and correctly.

Thanks,
Mike.
0
Comment
Question by:MDarling
  • 4
  • 3
8 Comments
 

Expert Comment

by:rprakasan
ID: 7031759
Are u using any proxy settings on this. Then I suggest set the manual proxy setting in the Opera browser.
0
 
LVL 3

Author Comment

by:MDarling
ID: 7031793
no proxy settings - just a straight workstation connecting to the web.

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7032974
enable following in /etc/ppp/options

defaultroute

0
 
LVL 3

Author Comment

by:MDarling
ID: 7033398
Hi ahoffman,

I tried this without success.

I tried adding it to the pppd arguments in the KPPP connection and I also tried editing /etc/ppp/options and adding it in there.

Neither seems to work, am I doing something wrong?

Regards,
Mike.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 7034179
please post /etc/ppp/options
You also may have n options.* file there for your named connection, check it too.
And there should be a ip-up script, it should contain something like:

    /sbin/route add default gw $REMOTEIP dev $INTERFACE
0
 
LVL 3

Author Comment

by:MDarling
ID: 7035831
Hi ahoffman

/etc/ppp/options

>>>>
lock
defaultroute
<<<<

/etc/ppp/ip-up

>>>>
#!/bin/bash

# This file should not be modified -- make local changes to
# /etc/ppp/ip-up.local instead

LOGDEVICE=$6
REALDEVICE=$1

export PATH=/sbin:/usr/sbin:/bin:/usr/bin

[ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] && /etc/sysconfig/network-scripts/ifup-post ifcfg-${LOGDEVICE}

[ -x /etc/ppp/ip-up.local ] && /etc/ppp/ip-up.local "$@"

exit 0
<<<<


I don't have an ip-up.local.

Regards,
Mike.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
ID: 7036690
ip-up does not setup the required route, try with following:

  INTERFACE=$1
  REMOTEIP=$5
  /sbin/route add default gw $REMOTEIP dev $INTERFACE
0
 
LVL 3

Author Comment

by:MDarling
ID: 7037739
Hi ahoffman,

Thanks for your help, your solution worked with the exception I needed to use REMOTEIP=$4 rather than $5.

Thanks, a lot.
Regards,
Mike.
0

Featured Post

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

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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.:
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.

744 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