Re: Callback ppp
Alexey Chetroi [debian-user] <17/11/02 12:02 +0200>:
> On Sun, Nov 17, 2002 at 12:01:23AM +0000, Vittorio wrote:
> > Alexey Chetroi [debian-user] <15/11/02 10:21 +0200>:
> > > On Thu, Nov 14, 2002 at 05:45:16PM +0000, Vittorio wrote:
> > > >
> > > > At work they've installed a callback RAS.
> > > >
> > > > I've read the PPP documentation and had a look at the callback scripts
> > > > that are far from being intuitive and easy to use.
> > >
> > > man pppd is enough and there's always your friend google :)
> > > pppd from woody supports "callback 123456" option. Exit code of pppd
> > > is 14 on successful callback negotiation. Right after that I start pppd
> > > with regular options beside chat-script: chat-script just should answer the
> > > incoming call. It also possible to use dial-on-demand with callback.
> >
> > Perhaps I'm not that smart because I'm only able to start ppp by means
> > of pppconfig and pon/poff. Nonetheless I've read almost everything in
> > the net about this subject. But I'm somewhat confused. What
> > I need is a step by step explanation on how to make it.
> >
> Ok, take a look at my examples. I'm dialing in ISP's cisco AS and
> request callback by CBCP (CallBack Control Protocol IIRC). windows RAS
> has it also IMHO (correct me if I'm wrong). Anyway, this works for me :)
>
> -- options to request callback
>
> /etc/ppp/peers/cbreq
> hide-password
> noproxyarp
> noauth
> nodetach
> connect "/usr/sbin/chat -v -f /etc/chatscripts/mtc"
> debug
> /dev/ttyS0
> 115200
> defaultroute
> noipdefault
> user PPP_Login_Name
> 0:212.0.201.1 # i'm using dial-on-demand, so i need peer's ip address to be specified
> ipcp-accept-local # you can also add ipcp-accept-remote
> ipparam provider
> demand
> usepeerdns
> idle 600
> mru 546 # do I really need this?
> mtu 546
> callback 752222 # what number to call you
>
> -- options to answer callback
> /etc/ppp/peers/cbans
> hide-password
> noauth
> nodetach
> connect "/usr/sbin/chat -v -f /etc/chatscripts/cbans"
> debug
> /dev/ttyS0
> 115200
> defaultroute
> noipdefault
> user PPP_Login_Name
> 0:212.0.201.1
> ipcp-accept-local
> ipparam provider
> usepeerdns
> idle 400
> mru 546
> mtu 546
>
> /etc/chatscripts/mtc
> s chatfile was generated by pppconfig 2.0.10.
> # Please do not delete any of the comments. Pppconfig needs them.
> #
> # ispauth CHAP
> # abortstring
> ABORT BUSY ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
> # modeminit
> '' ATZ
> # ispnumber
> OK-AT-OK ATDP500900
> CONNECT \d\c
>
> /etc/chatscripts/cbans
> # This chatfile was generated by pppconfig 2.0.10.
> # Please do not delete any of the comments. Pppconfig needs them.
> #
> # ispauth CHAP
> # abortstring
> ABORT BUSY ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
> RING ATA
> CONNECT \d\c
>
> to dial your callback ISP, you just use next commands
> # pppd call cbreq
> (after this you should analyze return code, on successful callback
> negotiation it returns 14)
> # pppd call cbans
>
> I put all this into a script
> /etc/ppp/onppp
> #!/bin/sh
>
> while true; do
> echo -n "requesting ppp callback..."
> /usr/sbin/pppd call cbreq
> if [ $? -eq 14 ]; then
> echo "ok."
> /usr/sbin/pppd call cbans
> else
> echo "Something wrong..."
> fi
> done
>
> to start ppp on boot I've changed ppp_on_boot to:
> /etc/ppp/ppp_on_boot
> ###!/bin/sh
> #
> # Rename this file to ppp_on_boot and pppd will be fired up as
> # soon as the system comes up, connecting to `provider'.
> #
> # If you also make this file executable, and replace the first line
> # with just "#!/bin/sh", the commands below will be executed instead.
> #
>
> # The location of the ppp daemon itself (shouldn't need to be changed)
> PPPD=/usr/sbin/pppd
> # The default provider to connect to
> #$PPPD call provider
> /etc/ppp/onppp 1>/dev/null 2>&1 &
>
>
> /etc/ppp/onppp should be executable. Hope this helps :) Good luck!
>
> --
>
> Best regards,
> Alexey Chetroi
Thank you very much, indeed!
We Italians say: one thousand thanks!
Best Regards AND Merry Xmas & Happy New Year
Vittorio
Reply to: