waldner@wz:~$ grep def /etc/ppp/options
defaultroute
hth+cheers,
&rw
--
-- "Women novelists are a bit like a dog walking
-- upon his hind legs; he does not do it well but
-- one is surprised to see that he does it at all"
----
I always type
pppd eth0
(wait a while and make sure ppp0 is up)
route add default gw x.x.x.x (isp's ip)
to make it work.
but how can I make ppp0 the default gateway automaticly when ppp0 is up?
Can I add some option to ppp, so ppp will do the right thing?
Or must I need a script like the original /etc/init.d/pppd comes with
debian's package?
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
> On Thu, 16 Aug 2001 14:05:07 +0800, Tao Liu writes:
> <snip>
> >but how can I make ppp0 the default gateway automaticly when
> ppp0 is up?
> <snip>
>
> waldner@wz:~$ grep def /etc/ppp/options
> defaultroute
>
I also believe that
route add default ppp0
also works (although it is a while since I have done tis.
Ian
dunno, but if you have to set the route manually
route add -net 0/0 ppp0
will certainly work.
It愀 just that Tao asked for auto/magic, and that lies in the
options-file resp. in invoking pppd like
pppd eth0 defaultroute
(maybe the options must be reserved, I don愒 have PPPoE-hacks in my
pppd, only PPTP- ones).
cheers,
&rw
--
-- Windows, another fine product from the folks who gave us edlin.
----
Just looked at the ISDN scripts here at work...
route add default ippp0
should be the same for ppp0 tho
>
> dunno, but if you have to set the route manually
> route add -net 0/0 ppp0
> will certainly work.
>
> It愀 just that Tao asked for auto/magic, and that lies in the
> options-file resp. in invoking pppd like
> pppd eth0 defaultroute
> (maybe the options must be reserved, I don愒 have PPPoE-hacks in my
> pppd, only PPTP- ones).
>
defaultroute in options is definately the right way to go.
I had one machine here a while ago where we put the route sdd default.... in
the ip-up script
1. Ensure that no other default route is defined prior to enabling ppp.
2. add the keyword
defaultroute
to your ppp options file.
3. ensure that your resolv.conf points to a good Domain Name server
4. ensure that ip_forward under /proc/sys/net/ipv4/ is set at value 1.
5. Run a good firewall script on ipchains/iptables to ensure port forwarding
and security.
Regards
Nik Butler
Director Wired4Life Limited
n...@wired4life.org
07713 241 956
www.wired4life.org
I have done the first 4 steps, and is going to step 5.
Which script shall I insert my firewall script to?
(In redhat, I insert it to /etc/rc.d/rc.local)
Regards
Tao Liu
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Well thats gonna depend on your kernel but lets assume your running 2.2 and
use ipchains for firewalling.
Goto freshmeat.net and search for "ipchains-firewall" which provides a perl
script that can be run as
firewall.sh ppp0 eth0
place a new script in your /etc/ppp/ip-up.d/ directory as
90firewall.sh make sure its executable and it should at least
contain
#/bin/sh
firewall.sh ppp0 eth0
If our using kernel 2.4.x then look for a similar script for "iptables" of
which a few exist and provide similar functionality to ipchains-firewall
Try to make use of the ip-up.d and ip-down.d local directories under
/etc/ppp as this will let you ensure that certain scripts can be
enabled/disabled when ppp goes up. Note also that these scripts export a n
umber of environment variables which allow you to more clearly specify
elements for your script.
Regards
Nik Butler
Director Wired4Life Limited
n...@wired4life.org
07713 241 956
www.wired4life.org