Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Nov 2000 19:47:04 +1000
From:      "Haikal Saadh" <wyldephyre2@yahoo.com>
To:        "ML Duke" <mlduke@concentric.net>, <tatsu@rpg.pl>
Cc:        <newbies@freebsd.org>
Subject:   RE: Here's an idea...
Message-ID:  <HPEIKDAPPNAFBPFBNMDAOECFCDAA.wyldephyre2@yahoo.com>
In-Reply-To: <Pine.BSF.4.10.10011181150080.27321-100000@mlduke.concentric.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for the help, guys...

I managed to fix the prob my editing
/usr/share/examples/ppp/ppp.conf.sample.

I edited the ppp.conf file that came with /etc/ppp/, and to be honest, I
can't see the difference between the two. Even the chat script...except one
works and one doesn't.

I've gotten that box running as a http proxy now...it even autodials :).

Score one for the good guys!


>-----Original Message-----
>From: ML Duke [mailto:mlduke@concentric.net]
>Sent: Sunday, 19 November 2000 5:09 AM
>To: Haikal Saadh
>Subject: Re: Here's an idea...
>
>
>> So here's an idea: Hows about someone have a site
>> somewhere we can submit our ppp.conf files, so that
>> other people can look up which config works for which ISP?
>
>Relative to ISP's, a script follows below that you
>may (or may not) find interesting.
>
>ML Duke
>
>Begin script:
>
>#!/bin/sh
>/usr/sbin/pppd connect '/usr/bin/chat -v ABORT BUSY "" \
>        \\dATE0Q0 OK ATS7=60S38=40 OK \
>        ATDTphone# CONNECT "" ser: mlduke@ppp word: password' \
>        /dev/cuaa1 57600 crtscts \
>        modem lock debug netmask 255.255.255.0 \
>        noipdefault defaultroute
>exit 0
>
>Then it disconnects as follows:
>
>#!/bin/sh
>
>DEVICE=ppp0
>#
># If the ppp0 pid file is present then the program is running. Stop it.
>if [ -r /var/run/$DEVICE.pid ]; then
>	kill -INT `cat /var/run/$DEVICE.pid`
>#
># If unsuccessful, ensure that the pid file is removed.
>#
>	if [ ! "$?" = "0" ]; then
>		echo "removing stale $DEVICE pid file."
>		rm -f /var/run/$DEVICE.pid
>		exit 1
>	fi
>#
># Success. Terminate with proper status.
>#
>	echo "$DEVICE link terminated"
>	exit 0
>fi
>#
># The link is not active
>#
>echo "$DEVICE link is not active"
>exit 1
>
>Here's the /etc/ppp/ppp.conf file that goes with it
>(slightly edited for obvious reasons).
>It's not pretty--but it works.
>#################################################################
>#
>#  	PPP  Sample Configuration File
>#
>#	  Written by Toshiharu OHNO
>#
># $Id: ppp.conf.sample,v 1.5.2.6 1997/05/12 14:08:52 brian Exp $
>#
>#################################################################
>
># Default setup. Always executed when PPP is invoked.
>#
>    default:
>       set device /dev/cuaa1
>       set speed 57600
>       set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\"
>AT&B1&C1&D2&K3&S0&M4S0=0537=0 \\dATDT\\T TIMEOUT 40 CONNECT"
>    pop3.concentric.net
>       set phone "phone#"
>       set login "TIMEOUT 10 gin:-BREAK-gin: -u username -p password :
>ppp"
>       set timeout 120
>       deny lqr
>       setifaddr 207.155.184.72 206.173.119.72
>       delete ALL
>       add 0 0 HISADDR
># Example with login script
>#   o From PPP prompt,
>#	ppp> dial simplesite
>#     automatically dials and performs the login script.
>#
>#       ppp> load simplesite
>#     loads and executes commands, but doesn't dial.
>#
>#   o From shell, invoke as
>#       % ppp simplesite
>#     to load commands associated with the 'simplesite' label. Use,
>#       ppp> dial
>#     to establish the connection.
>#
>#simplesite:
># set phone 12345678
># set login "TIMEOUT 5 login:-\\r-login: ppp word: ppp ocol: ppp"
># set timeout 120
>
># Multi-phone example
>#
>multiphone:
> set phone 12345678:12345679:12345670:12345671
> set login "TIMEOUT 5 login:-\\r-login: ppp word: ppp ocol: ppp"
>
># If the peer requires to use CHAP, don't forget to supply authname
># and authkey.
>#
># If you'd like to use CHAP to authenticate with the peer, comment out
># the line ``enable chap'' below. You also need to prepare /etc/ppp.secret.
>#
># If the remote system sends its system name within the CHAP packet and it
># is found in /etc/ppp.secret, then the secret key is taken from that file
># and value of authkey specified here is ignored.
>#
>#chapsite:
># set phone 12345678
># set login "TIMEOUT 5 login:-\\r-login: ppp word: ppp"
># deny pap
># accept chap
># enable chap
># set authname MySystemName
># set authkey  OurSecretKey
>
># Speaking PAP is like speaking CHAP
>#
>#papsite:
># set phone 12345678
># set login "TIMEOUT 5 login:-\\r-login: ppp word: ppp"
># deny chap
># accept pap
># enable pap
># set authname MyUserName
># set authkey  MyPassword
>
># On demand dialup example
>#  Here, we assume that local side use 192.244.185.226 and
>#  remote side use 192.244.176.44 as their IP address.
>#  You must supply -auto option to invoke PPP.
>#
>#  $ ppp -auto ondemand
>#
>#ondemand:
># set phone 1234567
># set login "TIMEOUT 5 login:-\\r-login: ppp word: ppp"
># set timeout 120
># set ifaddr 192.244.185.226 192.244.176.44 255.255.255.0
># add 0 0 192.244.176.44
>
># Another on demand example
>#  If the peer assigns us an arbitrary IP and we can't predict what their
>#  IP will be either, take a wild guess at an some IPs that you can't
>#  currently route to.  Ensure that the "delete" and "add" lines are also
>#  present in ppp.linkup so that when we connect, things will be
>put straight.
>#  Note that it is illegal to use HISADDR here - HISADDR is only available
>#  in ppp.linkup (after the value has been established).
>#
>#  The /0 bit says that we insist on 0 bits of the specified IP actually
>#  being correct, therefore, the other side can assign any IP numbers.
>#
>#  We also set openmode active - this makes us initiate ppp negotiation.
>#  The default is to wait for the server to start talking.
>#
>pmdemand:
> set phone 1234567
> set login "TIMEOUT 5 login:-\\r-login: ppp word: ppp"
> set timeout 120
> set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0
> delete ALL
> add 0 0 10.0.0.2
> set openmode active
>
># Examples to connect using a null-modem cable from one machine to another.
># The important thing here is to allow the lqr packets on both sides.
># Without them enabled, we can't tell if the line's dropped - there
># should always be carrier on a direct connection.
># Here, the server sends lqr's every 10 seconds and quits if three in a
># row fail.
>#
># Make sure you don't have "deny lqr" in your default: on the client !
>#
>direct-client:
> set dial ""
> set line /dev/cuaa0
> set sp 115200
> set timeout 900
> set debug Phase Chat LQM
> set login "TIMEOUT 5 -\\r-login:-\\r-login: ppp word: ppp HELLO"
> set ifaddr 10.0.4.2 10.0.4.1
> add 10.0.4.2 255.255.255.255 127.0.0.1
>
>direct-server:
> set timeout 900 10 3
> set debug Phase LQM
> set ifaddr 10.0.4.1 10.0.4.2
> add 10.0.4.1 255.255.255.255 127.0.0.1
>
># Example to validate incoming user with CHAP
>#  Invoke as ``ppp -direct users'' from login script. User's system name
>#  and secret-key must be registered into /etc/ppp.secret.
>#  IP address assigned to peer is registered in ppp.secret, then that
>#  value is used and value in ``ifaddr'' command has no effect.
>#
>users:
> disable pap
> enable chap
> enable  proxy
> set authname ppp-server
> set ifaddr 192.244.176.44 292.244.184.31
>
># Example of Callback Request
>#
>#  Here, we assume that peer will hangup the line and initiates a callback
>#  after successful authentication. We simply use chat script capability
>#  and wait for a "NO CARRIER" response from our modem.
>#
>#  $ ppp callback
>#
>callback:
> set phone 0312345678
> set login "ABORT NO\\sCARRIER TIMEOUT 5 login:-\\r-login: MyName
>word: MySecret TIMEOUT 20 DUMMY"
> set debug phase chat
> dial
> quit
>
># Example for PPP/TELNET and PPP/TCP. Read doc for further details
>#
>ppptelnet:
> set escape 0xff
>
>ppptcp:
> set device 192.244.191.33:2400



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-newbies" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?HPEIKDAPPNAFBPFBNMDAOECFCDAA.wyldephyre2>